![]() |
scg3
0.6
|
A shape node that contains geometry to be rendered (leaf node). More...
#include "Shape.h"
Public Member Functions | |
| Shape () | |
| Shape (GeometryCoreSP geometryCore) | |
| virtual | ~Shape () |
| Shape * | addCore (CoreSP core) |
| void | addTextureCore (Texture2DCoreSP core) |
| int | getNTriangles () const |
| virtual void | accept (Traverser *traverser) |
| virtual void | render (RenderState *renderState) |
Public Member Functions inherited from scg::Leaf | |
| Leaf () | |
| virtual | ~Leaf ()=0 |
| virtual void | traverse (Traverser *traverser) |
Public Member Functions inherited from scg::Node | |
| Node () | |
| virtual | ~Node ()=0 |
| virtual void | clear () |
| virtual void | destroy () |
| int | getNCores () const |
| const std::string & | getMetaInfo (const std::string &key) const |
| void | setMetaInfo (const std::string &key, const std::string &value) |
| bool | isVisible () const |
| void | setVisible (bool isVisible=true) |
Static Public Member Functions | |
| static ShapeSP | create () |
| static ShapeSP | create (GeometryCoreSP geometryCore) |
Additional Inherited Members | |
Protected Member Functions inherited from scg::Node | |
| void | addSibling_ (NodeSP sibling) |
| void | removeSibling_ (Node *node, bool &result) |
| void | processCores_ (RenderState *renderState) |
| void | postProcessCores_ (RenderState *renderState) |
Protected Attributes inherited from scg::Node | |
| NodeSP | rightSibling_ |
| Composite * | parent_ |
| std::vector< CoreSP > | cores_ |
| bool | isVisible_ |
| std::unordered_map< std::string, std::string > | metaInfo_ |
A shape node that contains geometry to be rendered (leaf node).
Allowed core types: ColorCore, GeometryCore, MaterialCore, ShaderCore, TextureCore.
Note: When the node is rendered, its cores are procesed in the order they have been added to the node.
| scg::Shape::Shape | ( | ) |
Constructor.
| scg::Shape::Shape | ( | GeometryCoreSP | geometryCore | ) |
Constructor with GeometryCore.
|
virtual |
Destructor.
|
virtual |
Accept traverser (visitor pattern).
Reimplemented from scg::Node.
Add core to be applied to sub-tree.
Note: When the node is rendered, its cores are processed in the order they have been added to the node.
Allowed core types: ColorCore, GeometryCore, MaterialCore, ShaderCore, TextureCore.
| void scg::Shape::addTextureCore | ( | Texture2DCoreSP | core | ) |
Add texture to be applied to following geometry cores.
|
static |
Create shared pointer.
|
static |
Create shared pointer with GeometryCore.
| int scg::Shape::getNTriangles | ( | ) | const |
Get approximate number of triangles, called by InfoTraverser::visitShape().
|
virtual |
Render shape, i.e., process cores.
Reimplemented from scg::Node.