H3D API  2.4.1
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
H3D::LineProperties Class Reference

The LineProperties node specifies additional properties to be applied to all line geometry. More...

#include <H3D/LineProperties.h>

Inheritance diagram for H3D::LineProperties:
Inheritance graph

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...
 
- Public Member Functions inherited from H3D::X3DAppearanceChildNode
 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.
 
- Public Member Functions inherited from H3D::X3DNode
 X3DNode (Inst< SFNode > _metadata=0)
 Constructor.
 
X3DMetadataObjectgetMetadataByName (const string &_name)
 Given a name, the first X3DMetadataObject in the metadata field that matches that name is returned. More...
 
- Public Member Functions inherited from H3D::Node
 Node ()
 Constructor.
 
virtual Nodeclone (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.
 
X3DPrototypeInstancegetProtoInstanceParent ()
 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 FieldgetField (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...
 
- Public Member Functions inherited from H3D::H3DDisplayListObject
 H3DDisplayListObject (Inst< DisplayList > _displayList=0)
 Constructor.
 

Public Attributes

H3DUniquePtr< SFBoolapplied
 Determines if the linetype and linewidthScaleFactor should be applied or not. More...
 
H3DUniquePtr< SFInt32linetype
 The linetype field selects a line pattern to be used for lines. More...
 
H3DUniquePtr< SFFloatlinewidthScaleFactor
 The linewidthScaleFactor is a multiplicative value that scales the nominal linewidth by the linewidth scale factor. More...
 
- Public Attributes inherited from H3D::X3DNode
H3DUniquePtr< SFNodemetadata
 Meta data about the node. More...
 
- Public Attributes inherited from H3D::H3DDisplayListObject
H3DUniquePtr< DisplayListdisplayList
 The DisplayList instance handling the OpenGL caching of this object.
 

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase for this node.
 
- Static Public Attributes inherited from H3D::X3DNode
static H3DNodeDatabase database
 The H3DNodeDatabase for this node.
 

Additional Inherited Members

- Public Types inherited from H3D::Node
typedef std::map< Node *, Node * > DeepCopyMap
 A map type used during a deep copy clone() to map from original nodes to cloned nodes.
 
- Static Public Member Functions inherited from H3D::Node
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.
 
- Protected Member Functions inherited from H3D::Node
void cloneFieldValue (Field &_from, Field &_to, bool deepCopy, DeepCopyMap &deepCopyMap)
 A helper function for the clone() method. More...
 
- Static Protected Member Functions inherited from H3D::Node
static NodegetClonedInstance (Node *original, bool deepCopy, DeepCopyMap &deepCopyMap)
 A helper function for nodes that implement clone() More...
 

Detailed Description

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:

  1. Solid
  2. Dashed
  3. Dotted
  4. Dashed-dotted
  5. Dash-dot-dot

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:

Internal routes:

Member Function Documentation

◆ defaultXMLContainerField()

virtual string H3D::LineProperties::defaultXMLContainerField ( )
inlinevirtual

Returns the default xml containerField attribute value.

For this node it is "lineProperties".

Reimplemented from H3D::Node.

◆ getAffectedGLAttribs()

virtual GLbitfield H3D::LineProperties::getAffectedGLAttribs ( )
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().

Member Data Documentation

◆ applied

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().

◆ linetype

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().

◆ linewidthScaleFactor

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().


The documentation for this class was generated from the following files: