Privacy
An open-source, flexible 3D physical simulation framework
osg_material_manager::MaterialNode Class Reference

#include <MaterialNode.h>

Public Member Functions

 MaterialNode ()
 
virtual ~MaterialNode ()
 
void createNodeState ()
 
void setMaterial (OsgMaterial *m)
 
osg::ref_ptr< OsgMaterialgetMaterial ()
 
virtual void setBlending (bool mode)
 
void updateLights (std::vector< mars::interfaces::LightData *> &lightList)
 
void getNodePosition (mars::utils::Vector *pos)
 
bool addChild (osg::Node *child)
 
void setBrightness (float val)
 
void setUseFog (bool val)
 
void setUseNoise (bool val)
 
void setDrawLineLaser (bool val)
 
void setUseShadow (bool val)
 
void setExperimentalLineLaser (mars::utils::Vector lineLasePos, mars::utils::Vector lineLaserNormal, mars::utils::Vector lineLaserColor, mars::utils::Vector LaserAngle, float openingAngle)
 Sets the line laser : position of the laser : normalvector of the laser-plane : color of the laser in RGB : Angle of the laser, as an direction-vector : Opening angle of the laser; for complete laserLine, choose PI. More...
 
void setMaxNumLights (int n)
 
void seperateMaterial ()
 
void setTransparency (float t)
 
void enableInstancing ()
 
void setNeedInstancing (bool v, int numInstances)
 
void generateTangents ()
 
void setNeedTangents (bool v)
 

Protected Attributes

bool isCreated
 
bool useFog
 
bool useNoise
 
bool getLight
 
float brightness_
 
osg::ref_ptr< osg::Uniform > lightPosUniform
 
osg::ref_ptr< osg::Uniform > lightAmbientUniform
 
osg::ref_ptr< osg::Uniform > lightDiffuseUniform
 
osg::ref_ptr< osg::Uniform > lightSpecularUniform
 
osg::ref_ptr< osg::Uniform > lightIsSpotUniform
 
osg::ref_ptr< osg::Uniform > lightSpotDirUniform
 
osg::ref_ptr< osg::Uniform > lightIsDirectionalUniform
 
osg::ref_ptr< osg::Uniform > lightConstantAttUniform
 
osg::ref_ptr< osg::Uniform > lightLinearAttUniform
 
osg::ref_ptr< osg::Uniform > lightQuadraticAttUniform
 
osg::ref_ptr< osg::Uniform > lightIsSetUniform
 
osg::ref_ptr< osg::Uniform > lightCosCutoffUniform
 
osg::ref_ptr< osg::Uniform > lightSpotExponentUniform
 
osg::ref_ptr< OsgMaterialmaterial
 
osg::ref_ptr< osg::BlendEquation > blendEquation_
 
osg::ref_ptr< osg::Uniform > brightnessUniform
 
osg::ref_ptr< osg::Uniform > transparencyUniform
 
osg::ref_ptr< osg::Uniform > lineLaserPosUniform
 
osg::ref_ptr< osg::Uniform > lineLaserNormalUniform
 
osg::ref_ptr< osg::Uniform > lineLaserColor
 
osg::ref_ptr< osg::Uniform > lineLaserDirection
 
osg::ref_ptr< osg::Uniform > lineLaserOpeningAngle
 
osg::ref_ptr< osg::Uniform > useFogUniform
 
osg::ref_ptr< osg::Uniform > useNoiseUniform
 
osg::ref_ptr< osg::Uniform > useShadowUniform
 
osg::ref_ptr< osg::Uniform > numLightsUniform
 
osg::ref_ptr< osg::Uniform > drawLineLaserUniform
 
osg::ref_ptr< osg::StateSet > materialState
 
osg::ref_ptr< osg::Depth > depth
 
bool drawLineLaser
 
bool shadow
 
int maxNumLights
 
bool needTangents
 
bool needInstancing
 
int numInstances
 
mars::utils::Vector lineLasePos
 
mars::utils::Vector lineLaserNormal
 

Detailed Description

Definition at line 74 of file MaterialNode.h.

Constructor & Destructor Documentation

◆ MaterialNode()

osg_material_manager::MaterialNode::MaterialNode ( )

Definition at line 45 of file MaterialNode.cpp.

◆ ~MaterialNode()

osg_material_manager::MaterialNode::~MaterialNode ( )
virtual

Definition at line 51 of file MaterialNode.cpp.

Member Function Documentation

◆ addChild()

bool osg_material_manager::MaterialNode::addChild ( osg::Node *  child)

Definition at line 303 of file MaterialNode.cpp.

◆ createNodeState()

void osg_material_manager::MaterialNode::createNodeState ( )

Definition at line 59 of file MaterialNode.cpp.

◆ enableInstancing()

void osg_material_manager::MaterialNode::enableInstancing ( )

Definition at line 159 of file MaterialNode.cpp.

◆ generateTangents()

void osg_material_manager::MaterialNode::generateTangents ( )

Definition at line 290 of file MaterialNode.cpp.

◆ getMaterial()

osg::ref_ptr< OsgMaterial > osg_material_manager::MaterialNode::getMaterial ( )

Definition at line 120 of file MaterialNode.cpp.

◆ getNodePosition()

void osg_material_manager::MaterialNode::getNodePosition ( mars::utils::Vector pos)

Definition at line 312 of file MaterialNode.cpp.

◆ seperateMaterial()

void osg_material_manager::MaterialNode::seperateMaterial ( )

◆ setBlending()

void osg_material_manager::MaterialNode::setBlending ( bool  mode)
virtual

Definition at line 167 of file MaterialNode.cpp.

◆ setBrightness()

void osg_material_manager::MaterialNode::setBrightness ( float  val)

Definition at line 212 of file MaterialNode.cpp.

◆ setDrawLineLaser()

void osg_material_manager::MaterialNode::setDrawLineLaser ( bool  val)

Definition at line 199 of file MaterialNode.cpp.

◆ setExperimentalLineLaser()

void osg_material_manager::MaterialNode::setExperimentalLineLaser ( mars::utils::Vector  lineLasePos,
mars::utils::Vector  lineLaserNormal,
mars::utils::Vector  lineLaserColor,
mars::utils::Vector  LaserAngle,
float  openingAngle 
)

Sets the line laser : position of the laser : normalvector of the laser-plane : color of the laser in RGB : Angle of the laser, as an direction-vector : Opening angle of the laser; for complete laserLine, choose PI.

Definition at line 217 of file MaterialNode.cpp.

◆ setMaterial()

void osg_material_manager::MaterialNode::setMaterial ( OsgMaterial m)

Definition at line 55 of file MaterialNode.cpp.

◆ setMaxNumLights()

void osg_material_manager::MaterialNode::setMaxNumLights ( int  n)
inline

Definition at line 110 of file MaterialNode.h.

◆ setNeedInstancing()

void osg_material_manager::MaterialNode::setNeedInstancing ( bool  v,
int  numInstances 
)

Definition at line 153 of file MaterialNode.cpp.

◆ setNeedTangents()

void osg_material_manager::MaterialNode::setNeedTangents ( bool  v)

Definition at line 298 of file MaterialNode.cpp.

◆ setTransparency()

void osg_material_manager::MaterialNode::setTransparency ( float  t)

Definition at line 124 of file MaterialNode.cpp.

◆ setUseFog()

void osg_material_manager::MaterialNode::setUseFog ( bool  val)

Definition at line 185 of file MaterialNode.cpp.

◆ setUseNoise()

void osg_material_manager::MaterialNode::setUseNoise ( bool  val)

Definition at line 192 of file MaterialNode.cpp.

◆ setUseShadow()

void osg_material_manager::MaterialNode::setUseShadow ( bool  val)

Definition at line 206 of file MaterialNode.cpp.

◆ updateLights()

void osg_material_manager::MaterialNode::updateLights ( std::vector< mars::interfaces::LightData *> &  lightList)

Definition at line 228 of file MaterialNode.cpp.

Member Data Documentation

◆ blendEquation_

osg::ref_ptr<osg::BlendEquation> osg_material_manager::MaterialNode::blendEquation_
protected

Definition at line 131 of file MaterialNode.h.

◆ brightness_

float osg_material_manager::MaterialNode::brightness_
protected

Definition at line 122 of file MaterialNode.h.

◆ brightnessUniform

osg::ref_ptr<osg::Uniform> osg_material_manager::MaterialNode::brightnessUniform
protected

Definition at line 132 of file MaterialNode.h.

◆ depth

osg::ref_ptr<osg::Depth> osg_material_manager::MaterialNode::depth
protected

Definition at line 144 of file MaterialNode.h.

◆ drawLineLaser

bool osg_material_manager::MaterialNode::drawLineLaser
protected

Definition at line 146 of file MaterialNode.h.

◆ drawLineLaserUniform

osg::ref_ptr<osg::Uniform> osg_material_manager::MaterialNode::drawLineLaserUniform
protected

Definition at line 142 of file MaterialNode.h.

◆ getLight

bool osg_material_manager::MaterialNode::getLight
protected

Definition at line 121 of file MaterialNode.h.

◆ isCreated

bool osg_material_manager::MaterialNode::isCreated
protected

Definition at line 119 of file MaterialNode.h.

◆ lightAmbientUniform

osg::ref_ptr<osg::Uniform> osg_material_manager::MaterialNode::lightAmbientUniform
protected

Definition at line 123 of file MaterialNode.h.

◆ lightConstantAttUniform

osg::ref_ptr<osg::Uniform> osg_material_manager::MaterialNode::lightConstantAttUniform
protected

Definition at line 126 of file MaterialNode.h.

◆ lightCosCutoffUniform

osg::ref_ptr<osg::Uniform> osg_material_manager::MaterialNode::lightCosCutoffUniform
protected

Definition at line 127 of file MaterialNode.h.

◆ lightDiffuseUniform

osg::ref_ptr<osg::Uniform> osg_material_manager::MaterialNode::lightDiffuseUniform
protected

Definition at line 123 of file MaterialNode.h.

◆ lightIsDirectionalUniform

osg::ref_ptr<osg::Uniform> osg_material_manager::MaterialNode::lightIsDirectionalUniform
protected

Definition at line 125 of file MaterialNode.h.

◆ lightIsSetUniform

osg::ref_ptr<osg::Uniform> osg_material_manager::MaterialNode::lightIsSetUniform
protected

Definition at line 127 of file MaterialNode.h.

◆ lightIsSpotUniform

osg::ref_ptr<osg::Uniform> osg_material_manager::MaterialNode::lightIsSpotUniform
protected

Definition at line 124 of file MaterialNode.h.

◆ lightLinearAttUniform

osg::ref_ptr<osg::Uniform> osg_material_manager::MaterialNode::lightLinearAttUniform
protected

Definition at line 126 of file MaterialNode.h.

◆ lightPosUniform

osg::ref_ptr<osg::Uniform> osg_material_manager::MaterialNode::lightPosUniform
protected

Definition at line 123 of file MaterialNode.h.

◆ lightQuadraticAttUniform

osg::ref_ptr<osg::Uniform> osg_material_manager::MaterialNode::lightQuadraticAttUniform
protected

Definition at line 126 of file MaterialNode.h.

◆ lightSpecularUniform

osg::ref_ptr<osg::Uniform> osg_material_manager::MaterialNode::lightSpecularUniform
protected

Definition at line 124 of file MaterialNode.h.

◆ lightSpotDirUniform

osg::ref_ptr<osg::Uniform> osg_material_manager::MaterialNode::lightSpotDirUniform
protected

Definition at line 125 of file MaterialNode.h.

◆ lightSpotExponentUniform

osg::ref_ptr<osg::Uniform> osg_material_manager::MaterialNode::lightSpotExponentUniform
protected

Definition at line 127 of file MaterialNode.h.

◆ lineLasePos

mars::utils::Vector osg_material_manager::MaterialNode::lineLasePos
protected

Definition at line 152 of file MaterialNode.h.

◆ lineLaserColor

osg::ref_ptr<osg::Uniform> osg_material_manager::MaterialNode::lineLaserColor
protected

Definition at line 136 of file MaterialNode.h.

◆ lineLaserDirection

osg::ref_ptr<osg::Uniform> osg_material_manager::MaterialNode::lineLaserDirection
protected

Definition at line 137 of file MaterialNode.h.

◆ lineLaserNormal

mars::utils::Vector osg_material_manager::MaterialNode::lineLaserNormal
protected

Definition at line 152 of file MaterialNode.h.

◆ lineLaserNormalUniform

osg::ref_ptr<osg::Uniform> osg_material_manager::MaterialNode::lineLaserNormalUniform
protected

Definition at line 135 of file MaterialNode.h.

◆ lineLaserOpeningAngle

osg::ref_ptr<osg::Uniform> osg_material_manager::MaterialNode::lineLaserOpeningAngle
protected

Definition at line 138 of file MaterialNode.h.

◆ lineLaserPosUniform

osg::ref_ptr<osg::Uniform> osg_material_manager::MaterialNode::lineLaserPosUniform
protected

Definition at line 134 of file MaterialNode.h.

◆ material

osg::ref_ptr<OsgMaterial> osg_material_manager::MaterialNode::material
protected

Definition at line 130 of file MaterialNode.h.

◆ materialState

osg::ref_ptr<osg::StateSet> osg_material_manager::MaterialNode::materialState
protected

Definition at line 143 of file MaterialNode.h.

◆ maxNumLights

int osg_material_manager::MaterialNode::maxNumLights
protected

Definition at line 148 of file MaterialNode.h.

◆ needInstancing

bool osg_material_manager::MaterialNode::needInstancing
protected

Definition at line 150 of file MaterialNode.h.

◆ needTangents

bool osg_material_manager::MaterialNode::needTangents
protected

Definition at line 149 of file MaterialNode.h.

◆ numInstances

int osg_material_manager::MaterialNode::numInstances
protected

Definition at line 151 of file MaterialNode.h.

◆ numLightsUniform

osg::ref_ptr<osg::Uniform> osg_material_manager::MaterialNode::numLightsUniform
protected

Definition at line 141 of file MaterialNode.h.

◆ shadow

bool osg_material_manager::MaterialNode::shadow
protected

Definition at line 147 of file MaterialNode.h.

◆ transparencyUniform

osg::ref_ptr<osg::Uniform> osg_material_manager::MaterialNode::transparencyUniform
protected

Definition at line 133 of file MaterialNode.h.

◆ useFog

bool osg_material_manager::MaterialNode::useFog
protected

Definition at line 120 of file MaterialNode.h.

◆ useFogUniform

osg::ref_ptr<osg::Uniform> osg_material_manager::MaterialNode::useFogUniform
protected

Definition at line 139 of file MaterialNode.h.

◆ useNoise

bool osg_material_manager::MaterialNode::useNoise
protected

Definition at line 120 of file MaterialNode.h.

◆ useNoiseUniform

osg::ref_ptr<osg::Uniform> osg_material_manager::MaterialNode::useNoiseUniform
protected

Definition at line 139 of file MaterialNode.h.

◆ useShadowUniform

osg::ref_ptr<osg::Uniform> osg_material_manager::MaterialNode::useShadowUniform
protected

Definition at line 140 of file MaterialNode.h.


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