Public Member Functions |
| PrimList (const String &name) |
virtual geom::AlignedCuboid | GetBoundingBox () const |
virtual void | ProcessLimits (geom::Vec3 &minc, geom::Vec3 &maxc, const mol::Transform &tf) const |
virtual geom::Vec3 | GetCenter () const |
virtual void | CustomRenderPov (PovState &pov) |
virtual void | CustomRenderGL (RenderPass pass) |
virtual void | OnRenderModeChange () |
void | Clear () |
void | AddPoint (const geom::Vec3 &p, const Color &col) |
void | AddLine (const geom::Vec3 &p1, const geom::Vec3 &p2, const Color &col1, const Color &col2) |
void | AddSphere (const geom::Vec3 &cen, float rad, const Color &col) |
void | AddCyl (const geom::Vec3 &p0, const geom::Vec3 &p1, float r1, float r2, const Color &col1, const Color &col2) |
void | AddText (const std::string &text, const geom::Vec3 &pos, const Color &col, float point_size) |
void | SetDiameter (float d) |
void | SetRadius (float r) |
void | SetColor (const Color &c) |
void | SetSphereDetail (unsigned int d) |
unsigned int | GetSphereDetail () const |
void | SetArcDetail (unsigned int d) |
unsigned int | GetArcDetail () const |
void | AddMesh (float *v, float *n, float *c, size_t nv, unsigned int *i, size_t ni) |
| GfxObj (const String &name) |
virtual GfxNodeP | Copy () const |
virtual void | DeepSwap (GfxObj &go) |
virtual void | RenderGL (RenderPass pass) |
virtual void | RenderPov (PovState &pov) |
virtual void | Export (Exporter *ex) |
virtual void | Apply (GfxNodeVisitor &v, GfxNodeVisitor::Stack st) |
virtual int | GetType () const |
virtual void | SetMatAmb (const Color &c) |
virtual void | SetMatDiff (const Color &c) |
virtual void | SetMatSpec (const Color &c) |
virtual void | SetMatShin (float s) |
virtual void | SetMatEmm (const Color &c) |
virtual void | ContextSwitch () |
virtual void | SetRenderMode (RenderMode::Type m) |
virtual RenderMode::Type | GetRenderMode () const |
virtual void | SetLineWidth (float w) |
virtual void | SetPolyMode (unsigned int m) |
virtual void | SetAALines (bool f) |
virtual void | SetLineHalo (float f) |
virtual void | SetOutline (bool f) |
virtual bool | GetOutline () const |
virtual void | SetOutlineMode (int m) |
virtual int | GetOutlineMode () const |
virtual void | SetOutlineWidth (float f) |
virtual float | GetOutlineWidth () const |
virtual void | SetOutlineExpandFactor (float f) |
virtual float | GetOutlineExpandFactor () const |
virtual void | SetOutlineExpandColor (const Color &c) |
virtual Color | GetOutlineExpandColor () const |
virtual void | SetOpacity (float f) |
virtual float | GetOpacity () const |
virtual void | ColorBy (const mol::EntityView &ev, const String &prop, const Gradient &g, float minv, float maxv) |
virtual void | InitGL () |
virtual bool | OnSelect (const geom::Line3 &l, geom::Vec3 &result, float zlim, bool pick_flag) |
virtual void | OnInput (const InputEvent &e) |
virtual void | OnGLCleanup () |
const mol::Transform & | GetTF () const |
void | SetTF (const mol::Transform &tf) |
void | AddLabel (const String &s, const geom::Vec3 &pos, const Color &col, float psize) |
void | AddLabel (const String &s, const geom::Vec3 &pos, const Color &col) |
void | AddLabel (const String &s, const geom::Vec3 &pos, float psize) |
void | AddLabel (const String &s, const geom::Vec3 &pos) |
void | ClearLabels () |
void | FlagRebuild () |
void | FlagRefresh () |
bool | GetAALines () const |
float | GetLineWidth () const |
float | GetLineHalo () const |
void | SetNormalSmoothFactor (float smoothf) |
float | GetNormalSmoothFactor () const |
Material | GetMaterial () const |
void | SetMaterial (const Material &m) |
void | SmoothVertices (float smoothf) |
void | GLCleanup () |
void | Debug (unsigned int flags) |
| GfxObjBase (const String &name) |
| GfxNode (const String &name) |
virtual | ~GfxNode () |
virtual void | DeepSwap (GfxNode &n) |
String | GetName () const |
void | RemoveAll () |
void | Rename (const String &name) |
void | Add (GfxObjP obj) |
bool | IsNameAvailable (const String &name) const |
void | Remove (GfxObjP obj) |
void | Add (GfxNodeP node) |
void | Remove (GfxNodeP node) |
void | Remove (const String &name) |
size_t | GetChildCount () const |
void | Hide () |
void | Show () |
bool | IsVisible () const |
bool | IsAttachedToScene () const |
gfx::GfxNodeP | GetParent () const |
const GfxNodeVector & | GetChildren () const |
GfxNodeVector & | GetChildren () |
void AddMesh |
( |
float * |
v, |
|
|
float * |
n, |
|
|
float * |
c, |
|
|
size_t |
nv, |
|
|
unsigned int * |
i, |
|
|
size_t |
ni |
|
) |
| |
add triangle mesh
v : pointer to nv*3 floats for the positions (mandatory) n : pointer to nv*3 floats for the normals (may be NULL) c : pointer to nv*4 floats for the colors (may be NULL) nv: number of vertices, normals, and colors i : pointer to ni*3 vertex indices ni: number of index triplets
Python interface, using numpy arrays:
AddMesh(vertex_array, normal_array, color_array, index_array)
where normal_array and color_array may be None