H3D API
2.4.1
|
The LineProperties node specifies additional properties to be applied to all line geometry. More...
#include <H3D/LineProperties.h>
Public Member Functions | |
LineProperties (Inst< DisplayList > _displayList=0, Inst< SFNode > _metadata=0, Inst< SFBool > _applied=0, Inst< SFInt32 > _linetype=0, Inst< SFFloat > _linewidthScaleFactor=0) | |
Constructor. | |
virtual GLbitfield | getAffectedGLAttribs () |
Returns a bitmask of the OpenGL attrib bits that will be affected by this node. More... | |
virtual void | render () |
Set up the line properties with OpenGL. | |
virtual string | defaultXMLContainerField () |
Returns the default xml containerField attribute value. More... | |
![]() | |
X3DAppearanceChildNode (Inst< DisplayList > _displayList=0, Inst< SFNode > _metadata=0) | |
Constructor. | |
virtual void | preRender () |
This function will be called by the X3DShapeNode before any rendering of geometry and before the call to the render function. More... | |
virtual void | postRender () |
This function will be called by the X3DShapeNode after the geometry has been rendered. | |
![]() | |
X3DNode (Inst< SFNode > _metadata=0) | |
Constructor. | |
X3DMetadataObject * | getMetadataByName (const string &_name) |
Given a name, the first X3DMetadataObject in the metadata field that matches that name is returned. More... | |
![]() | |
Node () | |
Constructor. | |
virtual Node * | clone (bool deepCopy=true, DeepCopyMap *deepCopyMap=NULL) |
Returns a new instance of this node type with the same state as this one. More... | |
virtual | ~Node () |
Destructor. | |
X3DPrototypeInstance * | getProtoInstanceParent () |
If this node is the root node in the proto body of a X3DPrototypeInstance then this will return that node. More... | |
void | setProtoInstanceParent (X3DPrototypeInstance *p) |
Set the X3DPrototypeInstance this node is the the root node if applicaple. | |
virtual void | traverseSG (TraverseInfo &ti) |
traverseSG is called once per scenegraph loop on the scene in order to traverse the scenegraph. More... | |
virtual bool | lineIntersect (const Vec3f &from, const Vec3f &to, LineIntersectResult &result) |
Detect intersection between a line segment and the Node. More... | |
virtual void | closestPoint (const Vec3f &p, NodeIntersectResult &result) |
Find closest point on Node to p. More... | |
virtual bool | movingSphereIntersect (H3DFloat radius, const Vec3f &from, const Vec3f &to, NodeIntersectResult &result) |
Detect collision between a moving sphere and the Node. More... | |
virtual Field * | getField (const string &_name) const |
return a pointer to the field specified by name within this instance | |
int | addDestructCallback (void(*func)(Node *, void *), void *args) |
Add a callback function to be run on destruction of node. More... | |
int | removeDestructCallback (void(*func)(Node *, void *), void *args) |
Add a callback function to be run on destruction of node. More... | |
![]() | |
H3DDisplayListObject (Inst< DisplayList > _displayList=0) | |
Constructor. | |
Public Attributes | |
H3DUniquePtr< SFBool > | applied |
Determines if the linetype and linewidthScaleFactor should be applied or not. More... | |
H3DUniquePtr< SFInt32 > | linetype |
The linetype field selects a line pattern to be used for lines. More... | |
H3DUniquePtr< SFFloat > | linewidthScaleFactor |
The linewidthScaleFactor is a multiplicative value that scales the nominal linewidth by the linewidth scale factor. More... | |
![]() | |
H3DUniquePtr< SFNode > | metadata |
Meta data about the node. More... | |
![]() | |
H3DUniquePtr< DisplayList > | displayList |
The DisplayList instance handling the OpenGL caching of this object. | |
Static Public Attributes | |
static H3DNodeDatabase | database |
The H3DNodeDatabase for this node. | |
![]() | |
static H3DNodeDatabase | database |
The H3DNodeDatabase for this node. | |
Additional Inherited Members | |
![]() | |
typedef std::map< Node *, Node * > | DeepCopyMap |
A map type used during a deep copy clone() to map from original nodes to cloned nodes. | |
![]() | |
static unsigned int | nrNodesAlive () |
Returns the nr of nodes currently alive, i.e. nodes created but not destructed. | |
static int | nrNodesCreated () |
Returns the number of nodes created in total since the start of the program. | |
![]() | |
void | cloneFieldValue (Field &_from, Field &_to, bool deepCopy, DeepCopyMap &deepCopyMap) |
A helper function for the clone() method. More... | |
![]() | |
static Node * | getClonedInstance (Node *original, bool deepCopy, DeepCopyMap &deepCopyMap) |
A helper function for nodes that implement clone() More... | |
The LineProperties node specifies additional properties to be applied to all line geometry.
The linetype and linewidth shall only be applied when the applied field has value TRUE. When the value of the applied field is FALSE, a solid line of nominal width shall be produced. The colour of the line is specified by the associated Material node.
The linetype field selects a line pattern as defined in the International Register of Graphical Items. The following line patterns are available:
The linewidthScaleFactor is a multiplicative value that scales the nominal linewidth by the linewidth scale factor. This resulting value shall then be mapped to the nearest available line width. A value less than or equal to zero refers to the minimum available line width.
Changing the line types does NOT CHANGE THE HAPTIC RENDERING of lines. It only changes the visual appearance.
Examples:
|
inlinevirtual |
Returns the default xml containerField attribute value.
For this node it is "lineProperties".
Reimplemented from H3D::Node.
|
inlinevirtual |
Returns a bitmask of the OpenGL attrib bits that will be affected by this node.
The value can be used in glPushAttrib in order to save the current state.
Reimplemented from H3D::X3DAppearanceChildNode.
Referenced by H3D::Appearance::getAffectedGLAttribs().
H3DUniquePtr< SFBool > H3D::LineProperties::applied |
Determines if the linetype and linewidthScaleFactor should be applied or not.
Access type: inputOutput
Default value: true
Referenced by LineProperties(), and render().
H3DUniquePtr< SFInt32 > H3D::LineProperties::linetype |
The linetype field selects a line pattern to be used for lines.
For more information see the Detailed description
Access type: inputOutput
Default value: 1
Referenced by LineProperties(), and render().
H3DUniquePtr< SFFloat > H3D::LineProperties::linewidthScaleFactor |
The linewidthScaleFactor is a multiplicative value that scales the nominal linewidth by the linewidth scale factor.
This resulting value shall then be mapped to the nearest available line width. A value less than or equal to zero refers to the minimum available line width.
Access type: inputOutput
Default value: 0
Referenced by LineProperties(), and render().