Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

RE: C++ Move Element

$
0
0

[quote user="HDR_Coder"]For the C++ API (V8i) how do you move an entire element, i.e. offset it[/quote]

Paul's response will get you started.  But then you bang into the problem of creating your transform.

A long time ago, there used to be an mdlElmdscr_offset function.  However, MDL programmers eat iron filings and drink battery acid, so a simple function was too easy, and Bentley Systems removed it from the MDL.

Search the delivered examples for mdlTMatrix_ functions.  The circuit example constructs a Transform in circuitcomp.cpp, and there are usages demonstrated in other examples.  The basic moves are...

  1. Create an identity matrix (a no-op transform)
    1. Optionally rotate the matrix by the inverse of the view rotation
    2. Optionally set the scale of the matrix
  2. Set the transform's offset (translation)
  3. Apply the transform to the element


Viewing all articles
Browse latest Browse all 7260

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>