50 #define POLYLINECOLLECTIONOBJECT_C 56 #include "PolyLineCollectionObject.hh" 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 NULL!" << 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 )
virtual QString getObjectinfo()
Get all Info for the Object as a string.
ACG::SceneGraph::PolyLineCollectionNodeT< PolyLineCollection > * collectionNode()
Get the scenegraph Node.
void deleteData()
Delete all data attached to this object ( calls delete on each object )
bool pickingEnabled()
Check if picking is enabled for this Object.
virtual void setName(QString _name) override
path to the file from which the object is loaded ( defaults to "." )
const UpdateType UPDATE_ALL(UpdateTypeSet(1))
Identifier for all updates.
void set_line_width(float _sz)
set line width (default: 1.0)
void set_random_color()
Generates a random color and sets it.
virtual void cleanup()
Reset current object, including all related nodes.
PickTarget
What target to use for picking.
virtual void cleanup() override
#define DATA_POLY_LINE_COLLECTION
void enablePicking(bool _enable)
Enable or disable picking for this Object.
ACG::SceneGraph::PolyLineCollectionNodeT< PolyLineCollection > * collectionNode_
Scenegraph Mesh Node.
virtual void init(PolyLineCollection *_collection=0)
Initialize current object, including all related nodes.
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.
QString name() const
return the name of the object. The name defaults to NONAME if unset.
void setName(QString _name)
Set the name of the Object.
QString getObjectinfo()
Get all Info for the Object as a string.
virtual ~PolyLineCollectionObject()
destructor
MaterialNode * materialNode()
get a pointer to the materialnode
PolyLineCollection * collection()
return a pointer to the line
void set_round_points(bool _b)
set round points enabled
bool picked(uint _node_idx)
detect if the node has been picked
PolyLineCollectionObject()
constructor
void setDataType(DataType _type)
PolyLineCollection * collection_
return a pointer to the line
virtual void update(UpdateType _type=UPDATE_ALL)
This function is called to update the object.
DataType dataType() const
void set_point_size(float _sz)
set point size (default: 1.0)
const UpdateType UPDATE_COLOR(UpdateTypeSet(1)<< 10)
Colors have changed.