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