C3D Toolkit  Kernel - 117982, Vision - 2.9.2.2
VSN::PatternMaterial Class Reference

Visual properties of the stencil material. More...

#include <vsn_patternmaterial.h>

+ Inheritance diagram for VSN::PatternMaterial:
+ Collaboration diagram for VSN::PatternMaterial:

Public Types

enum  Pattern
 Built-in patterns.
 

Public Member Functions

 PatternMaterial (Pattern pattern=Points, int size=1)
 Default constructor.
 
 PatternMaterial (const Color &color, Pattern pattern=Points, int size=1)
 Constructor by diffuse color. More...
 
virtual ~PatternMaterial ()
 Destructor.
 
virtual void glPerform (FaceSide faceSide=FaceSide::FrontAndBack)
 Initializes material for rendering.
 
virtual void Release ()
 Release the material.
 
PatternMaterialoperator= (const PatternMaterial &mat)
 Assignment operator.
 
bool operator== (const PatternMaterial &) const
 True if material is equivalent.
 
const Pattern GetPattern () const
 Return current pattern.
 
int GetPatternSize () const
 Return current pattern size.
 
void SetPattern (Pattern pattern, int size=1)
 Set current pattern.
 
- Public Member Functions inherited from VSN::Material
 Material ()
 Default constructor.
 
 Material (const Color &color, float opacity=1.f)
 Constructor by diffuse color. More...
 
 Material (const String &name, const float *pDiffuseColor)
 Constructor by diffuse color. More...
 
 Material (Texture2D *pTexture, const String &name=String())
 Constructor by texture and material name.
 
 Material (const Material &material)
 Copy constructor.
 
void CopyFrom (const Material &material)
 Sets other material value.
 
bool IsMaterialUnused () const
 True if material is not used.
 
bool IsMaterialPresentedTexture () const
 True if material is represented by texture.
 
Color GetAmbient () const
 Returns the ambient color value.
 
void SetAmbient (const Color &ambient)
 Sets ambient color.
 
Color GetDiffuse () const
 Returns diffuse color value.
 
void SetDiffuse (const Color &diffuse)
 Sets diffuse color.
 
Color GetSpecular () const
 Returns specular value.
 
void SetSpecular (const Color &specular)
 Sets specular value.
 
Color GetEmission () const
 Returns emission value.
 
void SetEmission (const Color &emission)
 Sets emission value.
 
float GetShininess () const
 Returns shininess value.
 
void SetShininess (float shininess)
 Sets shininess value. Only shininess values in the range [0, 128] are accepted.
 
uint GetTextureID () const
 Returns texture identifier.
 
bool IsTextureLoaded () const
 True if texture is loaded.
 
bool IsTransparent () const
 True if material is transparent.
 
size_t GetUseCount () const
 Return a count of the geometric objects which use the material.
 
Texture2DGetTexture () const
 Returns pointer to the texture.
 
void SetTexture (Texture2D *pTexture)
 Sets new texture.
 
uint GetHashMaterial () const
 Returns hash composed from all components.
 
void DeleteTexture ()
 Deletes texture.
 
bool AddGeomObject (Geometry *pGeom)
 Adds object with given material.
 
bool DetachGeomObject (const NodeKey &key)
 Detaches geometry object with given material from the array.
 
bool AddObjectId (const NodeKey &key)
 Adds geometry identifier with given material to the array.
 
bool DetachObjectId (const NodeKey &key)
 Detaches object from the array of identifiers that use this material.
 
virtual void glPerform (float)
 Initializes material for rendering with transparency.
 
Materialoperator= (const Material &mat)
 Assignment operator.
 
bool operator== (const Material &) const
 True if material is equivalent.
 
- Public Member Functions inherited from VSN::Feature
 Feature (Node *pParent=nullptr)
 Constructor.
 
 Feature (const NodeKey &key, const String &name)
 Constructor with name and unique key.
 
virtual ~Feature ()
 Destructor.
 
bool IsShareable () const
 Returns flag value. Component can be common for several essences.
 
const ObjectVector< Essence * > & GetEssences () const
 Returns vector containing all essences with reference to the Feature.
 
- Public Member Functions inherited from VSN::Node
 Node (Node *pParent=nullptr)
 Constructor with parent.
 
virtual ~Node ()
 Destructor.
 
NodeKey GetUniqueKey () const
 Returns key identifing Node instance.
 
void SetUniqueKey (const NodeKey &key)
 Sets the unique key for the instance.
 
NodeKey GetCustomKey () const
 Returns custom key identifing Node instance.
 
void SetCustomKey (const NodeKey &key)
 Sets the custom unique key for the instance.
 
NodeGetParentNode () const
 Returns pointer to the parent object or nullptr if no parent.
 
bool IsEnabled () const
 Returns the Node enabled flag. By default, the flag is always on.
 
ObjectList< Node * > GetChildNodes () const
 Return an array of child nodes for this node.
 
void SetParent (Node *pParent)
 Sets parent object to the object.
 
bool IsNotificationsBlocked () const
 True if notifications are blocked, otherwise, False.
 
bool SetBlockNotifications (bool block)
 Sets blocking of notifications and returns the previous blocking value.
 
- Public Member Functions inherited from VSN::Object
 Object (Object *pParent=nullptr)
 Default constructor. More...
 
virtual ~Object ()
 Destructor.
 
void SetParent (Object *pParent)
 NO TRANSLATION.
 
MutexGetMutex ()
 Object mutex.
 
String GetObjectName () const
 Returns name.
 
void SetObjectName (const String &name)
 Sets name.
 
bool IsControlType () const
 TRANSLATION.
 
ObjectGetParent () const
 NO TRANSLATION.
 
Variant GetProperty (const String &name) const
 NO TRANSLATION.
 
bool IsSignalsBlocked () const
 NO TRANSLATION.
 
bool SetBlockSignals (bool bBlock)
 NO TRANSLATION.
 
void AddEventListener (Object *pObject)
 NO TRANSLATION.
 
void RemoveEventListener (Object *pObject)
 NO TRANSLATION.
 
ObjectGetSender () const
 NO TRANSLATION.
 
Thread * GetThread () const
 NO TRANSLATION.
 
void BindWithThread (Thread *thread)
 NO TRANSLATION.
 
int StartTimer (int interval, TimerType timerType=tt_CoarseTimer)
 NO TRANSLATION.
 
void KillTimer (int id)
 NO TRANSLATION.
 
const ObjectList< Object * > & GetChildren () const
 NO TRANSLATION.
 
template<typename T >
FindChild (const String &objName=String()) const
 NO TRANSLATION.
 
template<typename T >
ObjectList< T > FindChildren (const String &objName=String(), VSN::ChildFindingPolicies policies=VSN::FindAllNestedChildren) const
 NO TRANSLATION.
 
- Public Member Functions inherited from VSN::BasicObject
 BasicObject ()
 Default constructor.
 
virtual ~BasicObject ()
 Destructor.
 

Additional Inherited Members

- Protected Member Functions inherited from VSN::Material
 Material (MaterialPrivate &dd, Node *pParent)
 NO TRANSLATION.
 
- Protected Member Functions inherited from VSN::Feature
 Feature (FeaturePrivate &dd, Node *parent=nullptr)
 Private construсtor for inheritors.
 
- Protected Member Functions inherited from VSN::Node
 Node (NodePrivate &dd, Node *pParent)
 Sets the node enable flag. More...
 
virtual void SceneModificationEvent (const std::shared_ptr< SceneModification > &modification)
 The function is called in case of scene being modified.
 

Detailed Description

Visual properties of the stencil material.

Material class allows setting visual parameters of the stencil material.

Constructor & Destructor Documentation

◆ PatternMaterial()

VSN::PatternMaterial::PatternMaterial ( const Color color,
Pattern  pattern = Points,
int  size = 1 
)

Constructor by diffuse color.

The constructor sets diffuse color; the default ambient color is dark grey.


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