50 #define SPHEREOBJECT_C 57 #include <ACG/Scenegraph/GlutPrimitiveNode.hh> 58 #include <ACG/Scenegraph/MaterialNode.hh> 139 std::cerr <<
"Error when creating Sphere Object! materialNode is NULL!" << std::endl;
172 std::string nodename = std::string(
"SphereNode for Sphere " + _name.toUtf8() );
196 output +=
"========================================================================\n";
200 output +=
"Object Contains Sphere : ";
205 output +=
" Position ( " + QString::number(pos[0]) +
", " + QString::number(pos[1]) +
", " + QString::number(pos[2]) +
")";
206 output +=
" Size ( " + QString::number(size) +
")";
208 output +=
"========================================================================\n";
virtual QString getObjectinfo()
Get all Info for the Object as a string.
void setName(QString _name)
Set the name of the Object.
void deleteData()
Delete all data attached to this object ( calls delete on each object )
virtual void update(UpdateType _type=UPDATE_ALL)
Update the whole Object (Selection,Topology,...)
virtual void setName(QString _name) override
path to the file from which the object is loaded ( defaults to "." )
virtual void cleanup()
Reset current object, including all related nodes.
SphereNode * sphereNode_
Get the scenegraph Node.
std::string name() const
Returns: name of node (needs not be unique)
VectorT< float, 4 > Vec4f
void enablePicking(bool _enable)
Enable or disable picking for this Object.
void setColorInternal(bool _set)
Disable internal color processing.
virtual void init(SphereNode *_sphere=0)
Initialise current object, including all related nodes.
void enablePicking(bool _enable)
SphereObject()
constructor
ACG::SceneGraph::GlutPrimitiveNode SphereNode
Simple Name for SphereNode.
virtual void cleanup() override
VectorT< float, 3 > Vec3f
virtual ~SphereObject()
destructor
QString name() const
return the name of the object. The name defaults to NONAME if unset.
Primitive & get_primitive(int _idx)
get a primitive
MaterialNode * materialNode()
get a pointer to the materialnode
bool picked(uint _node_idx)
detect if the node has been picked
bool pickingEnabled()
Check if picking is enabled for this Object.
QString getObjectinfo()
Get all Info for the Object as a string.
void setDataType(DataType _type)
virtual void update(UpdateType _type=UPDATE_ALL)
This function is called to update the object.
SphereNode * sphereNode()
Get the scenegraph Node.
DataType dataType() const