Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

physics::Material Class Reference

Inheritance diagram for physics::Material:

Inheritance graph
[legend]
Collaboration diagram for physics::Material:

Collaboration graph
[legend]
List of all members.

Public Types

enum  ExternalizationType { Input = 1, Output = 2, IO = 3 }

Public Member Functions

 Material (const String &label="plastic", const gfx::Color4 &color=gfx::Color4("green"))
 Material (const Material &m)
virtual ~Material ()
virtual String className () const
virtual Object & clone () const
virtual void setBaseColor (const gfx::Color4 &color)
virtual void setBaseColor (const String &color)
virtual const gfx::Color4baseColor () const
virtual void setDensity (Real density)
virtual Real density () const
virtual void setSurfaceAppearance (const base::PathName &image)
virtual osg::ref_ptr< osg::StateSet > createState () const
virtual bool formatSupported (const String format, Real version=1.0, ExternalizationType type=IO) const
 query if specific format is supported (for input, output or both)

virtual void externalize (base::Externalizer &e, String format="", Real version=1.0)
 read or write object state to Externalizer

virtual bool isSameKindAs (const ReferencedObject &) const
virtual bool isSameKindAs (const Object &) const
void reference () const
bool unreference () const
const int referenceCount () const
void enableOnUnreferenceCall (bool enabled)
virtual void onUnreference () const
virtual void externalize (Externalizer &e, String format="", Real version=1.0) const
 write object state to Externalizer (throws if e is in Input)

void load (ref< VFile > archive, const String &format="", Real version=1.0)
void save (ref< VFile > archive, const String &format="", Real version=1.0)

Protected Types

enum  SurfaceAppearanceType { BaseColor, TextureImage }

Protected Attributes

String label
Real mDensity
SurfaceAppearanceType surfaceAppearanceType
gfx::Color4 mBaseColor
base::PathName surfaceTextureImage
bool stateSetCached
osg::ref_ptr< osg::StateSet > stateSet
int _refCount
bool onUnreferenceEnabled

Member Enumeration Documentation

enum base::Externalizable::ExternalizationType [inherited]
 

Enumeration values:
Input 
Output 
IO 

Definition at line 40 of file Externalizable.

enum physics::Material::SurfaceAppearanceType [protected]
 

Enumeration values:
BaseColor 
TextureImage 

Definition at line 74 of file Material.


Constructor & Destructor Documentation

physics::Material::Material const String &  label = "plastic",
const gfx::Color4 color = gfx::Color4("green")
 

Referenced by clone().

physics::Material::Material const Material m  ) 
 

virtual physics::Material::~Material  )  [virtual]
 


Member Function Documentation

virtual const gfx::Color4& physics::Material::baseColor  )  const [inline, virtual]
 

Definition at line 55 of file Material.

References mBaseColor.

virtual String physics::Material::className  )  const [inline, virtual]
 

return the name of the object's class type. Must be defined by derived classes.

Implements base::Object.

Definition at line 50 of file Material.

Referenced by clone().

virtual Object& physics::Material::clone  )  const [inline, virtual]
 

Definition at line 51 of file Material.

References className(), Material(), and NewNamedObj.

virtual osg::ref_ptr<osg::StateSet> physics::Material::createState  )  const [virtual]
 

virtual Real physics::Material::density  )  const [inline, virtual]
 

Definition at line 58 of file Material.

References mDensity.

void base::Referenced::enableOnUnreferenceCall bool  enabled  )  [inline, inherited]
 

If enabled, each call to unreference() will also call virtual method onUnreference()

Definition at line 115 of file Referenced.

References base::Referenced::onUnreferenceEnabled.

virtual void base::Externalizable::externalize Externalizer e,
String  format = "",
Real  version = 1.0
const [virtual, inherited]
 

write object state to Externalizer (throws if e is in Input)

Reimplemented in physics::Box, physics::Capsule, physics::Cone, physics::Cylinder, physics::LODTerrain, physics::Polyhedron, physics::Sphere, robot::KinematicChain::Link, robot::KinematicChain, robot::ManipulatorDescription, robot::PlatformDescription, robot::RobotDescription, robot::sim::SimulatedManipulatorDescription, robot::sim::SimulatedRobotDescription, robot::sim::SimulatedSerialManipulator, robot::sim::SimulatedTool, and robot::ToolDescription.

virtual void physics::Material::externalize base::Externalizer e,
String  format = "",
Real  version = 1.0
[virtual]
 

read or write object state to Externalizer

Implements base::Externalizable.

virtual bool physics::Material::formatSupported const String  format,
Real  version = 1.0,
ExternalizationType  type = IO
const [inline, virtual]
 

query if specific format is supported (for input, output or both)

Implements base::Externalizable.

Definition at line 65 of file Material.

virtual bool base::Object::isSameKindAs const Object  )  const [inline, virtual, inherited]
 

Definition at line 47 of file Object.

virtual bool base::ReferencedObject::isSameKindAs const ReferencedObject  )  const [inline, virtual, inherited]
 

Definition at line 52 of file ReferencedObject.

void base::Externalizable::load ref< VFile archive,
const String format = "",
Real  version = 1.0
[inherited]
 

virtual void base::Referenced::onUnreference  )  const [inline, virtual, inherited]
 

Called by unreference() if enabled via enableOnUnreferenceCall(true). Typically overridden in subclasses that wish to know about unreference() calls - for example to handle manually breaking cyclic references

Reimplemented in robot::control::ControllableAdaptor::AdaptorControlInterface, and robot::control::ControllableAdaptor.

Definition at line 121 of file Referenced.

Referenced by base::Referenced::unreference().

void base::Referenced::reference  )  const [inline, inherited]
 

Increment the reference count by one, indicating that this object has another pointer which is referencing it.

Definition at line 65 of file Referenced.

References base::Referenced::_refCount.

const int base::Referenced::referenceCount  )  const [inline, inherited]
 

Return the number pointers currently referencing this object.

Definition at line 112 of file Referenced.

References base::Referenced::_refCount.

Referenced by robot::control::ControllableAdaptor::AdaptorControlInterface::onUnreference().

void base::Externalizable::save ref< VFile archive,
const String format = "",
Real  version = 1.0
[inherited]
 

virtual void physics::Material::setBaseColor const String &  color  )  [inline, virtual]
 

Definition at line 54 of file Material.

References mBaseColor, and stateSetCached.

virtual void physics::Material::setBaseColor const gfx::Color4 color  )  [inline, virtual]
 

Definition at line 53 of file Material.

References mBaseColor, and stateSetCached.

virtual void physics::Material::setDensity Real  density  )  [inline, virtual]
 

Definition at line 57 of file Material.

References mDensity.

virtual void physics::Material::setSurfaceAppearance const base::PathName image  )  [virtual]
 

bool base::Referenced::unreference  )  const [inline, inherited]
 

Decrement the reference count by one, indicating that a pointer to this object is referencing it. If the refence count goes to zero, it is assumed that this object is nolonger referenced and is automatically deleted.

Definition at line 81 of file Referenced.

References base::Referenced::_refCount, Exception, base::Referenced::onUnreference(), and base::Referenced::onUnreferenceEnabled.


Member Data Documentation

int base::Referenced::_refCount [mutable, protected, inherited]
 

Definition at line 136 of file Referenced.

Referenced by base::Referenced::reference(), base::Referenced::referenceCount(), base::Referenced::Referenced(), base::Referenced::unreference(), and base::Referenced::~Referenced().

String physics::Material::label [protected]
 

Definition at line 70 of file Material.

gfx::Color4 physics::Material::mBaseColor [protected]
 

Definition at line 78 of file Material.

Referenced by baseColor(), and setBaseColor().

Real physics::Material::mDensity [protected]
 

Definition at line 72 of file Material.

Referenced by density(), and setDensity().

bool base::Referenced::onUnreferenceEnabled [protected, inherited]
 

Definition at line 137 of file Referenced.

Referenced by base::Referenced::enableOnUnreferenceCall(), base::Referenced::Referenced(), and base::Referenced::unreference().

osg::ref_ptr<osg::StateSet> physics::Material::stateSet [mutable, protected]
 

Definition at line 83 of file Material.

bool physics::Material::stateSetCached [mutable, protected]
 

Definition at line 82 of file Material.

Referenced by setBaseColor().

SurfaceAppearanceType physics::Material::surfaceAppearanceType [protected]
 

Definition at line 76 of file Material.

base::PathName physics::Material::surfaceTextureImage [protected]
 

Definition at line 79 of file Material.


The documentation for this class was generated from the following file:
Generated on Thu Jul 29 16:40:42 2004 for OpenSim by doxygen 1.3.6