56 #define POLYLINECOLLECTIONOBJECT_C
62 #include "PolyLineCollectionObject.hh"
116 std::cerr <<
"Destructor error : Line Collection already deleted" << std::endl;
133 std::cerr <<
"Cleanup error : Line already deleted" << std::endl;
159 if (_collection == 0)
167 std::cerr <<
"Error when creating Line Object! materialNode is NULL!" << std::endl;
189 std::string nodename = std::string(
"PolyLineCollectionNode for PolyLineCollection " + _name.toUtf8() );
233 output +=
"========================================================================\n";
237 output +=
"Object Contains PolyLineCollection : ";
239 output += QString::number(
collection()->n_polylines() ) +
" polylines, ";
241 output +=
"========================================================================\n";
272 const size_t _targetIdx )
virtual void cleanup()
Reset current object, including all related nodes.
void enablePicking(bool _enable)
Enable or disable picking for this Object.
QString name() const
return the name of the object. The name defaults to NONAME if unset.
void deleteData()
Delete all data attached to this object ( calls delete on each object )
void set_point_size(float _sz)
set point size (default: 1.0)
virtual QString getObjectinfo()
Get all Info for the Object as a string.
void set_round_points(bool _b)
set round points enabled
ACG::Vec3d refinePick(ACG::SceneGraph::PickTarget _pickTarget, const ACG::Vec3d _hitPoint, const ACG::Vec3d _start, const ACG::Vec3d _dir, const size_t _targetIdx)
Refine picking on triangle meshes.
ACG::SceneGraph::PolyLineCollectionNodeT< PolyLineCollection > * collectionNode()
Get the scenegraph Node.
const UpdateType UPDATE_COLOR(UpdateTypeSet(1)<< 10)
Colors have changed.
MaterialNode * materialNode()
get a pointer to the materialnode
QString getObjectinfo()
Get all Info for the Object as a string.
DataType dataType() const
bool picked(uint _node_idx)
detect if the node has been picked
void set_line_width(float _sz)
set line width (default: 1.0)
virtual void update(UpdateType _type=UPDATE_ALL)
This function is called to update the object.
void setName(QString _name)
Set the name of the Object.
virtual void init(PolyLineCollection *_collection=0)
Initialize current object, including all related nodes.
ACG::SceneGraph::PolyLineCollectionNodeT< PolyLineCollection > * collectionNode_
Scenegraph Mesh Node.
PolyLineCollectionObject()
constructor
PolyLineCollection * collection()
return a pointer to the line
#define DATA_POLY_LINE_COLLECTION
void setDataType(DataType _type)
const UpdateType UPDATE_ALL(UpdateTypeSet(1))
Identifier for all updates.
virtual void setName(QString _name)
path to the file from which the object is loaded ( defaults to "." )
void set_random_color()
Generates a random color and sets it.
PickTarget
What target to use for picking.
virtual ~PolyLineCollectionObject()
destructor
PolyLineCollection * collection_
return a pointer to the line
bool pickingEnabled()
Check if picking is enabled for this Object.