fw3DViewer  8.4.0
Signals | Public Member Functions | List of all members
fw3DViewer Class Reference

Signals

void shapeClicked (QString shapeName, int x, int y, int z, int transparency)
 
void unselect ()
 

Public Member Functions

void addShape (string shapeType, string shapeName, dyn_string geometry)
 
void addGroup (string groupName, string groupParentName)
 
void addShapeInGroup (string groupName, string shapeType, string ShapeName, dyn_string property)
 
void delShape (string shapeOrGroupName)
 
dyn_string getShapeInfo (string shapeName, dyn_string geometry)
 
void setGeometry (string shapeOrGroupName, dyn_string geometry)
 
void setColor (string shapeOrGroupName, string color)
 
void setColorRGB (string shapeOrGroupName, string color)
 
void setTransparency (string shapeOrGroupName, string transparency)
 
void addTexture (string shape, string texturePath)
 
void setViewing (bool enable)
 
void setDecoration (bool enable)
 
void seekToShape (string name)
 
void setSeek (bool enable)
 
void setBackgroundColor (string color)
 
void setBackgroundColorRGB (string color)
 
void setCamera (dyn_string cameraSettings)
 
dyn_string getCamera ()
 
dyn_string getGroupShapes (string groupName)
 
void viewAll ()
 
void setHeadlight (bool on)
 

Member Function Documentation

void addGroup ( string  groupName,
string  groupParentName 
)

Add a group

Adds a group atached to the group GroupParentName.

Parameters
groupNameName of the group to create.
groupParentNameName of the parent group; note that the toplevel group is called "root".
void addShape ( string  shapeType,
string  shapeName,
dyn_string  geometry 
)

Add a shape to the scene.

Add a shape of type ShapeType, with name ShapeName and specified geometry properties to the scene.

The new shape is attached to the toplevel "root" group.

Parameters
shapeTypetype of the created shape; see Available Shape Types and Their Parameters
shapeNamename (unique identifier) given to the new shape.
geometrythe list of geometry properties for the new shape
void addShapeInGroup ( string  groupName,
string  shapeType,
string  ShapeName,
dyn_string  property 
)

Add a shape in a specified group

Add a shape of type shapeType, with name shapeName and specified geometry. The new shape is put in the group specified by groupName . If the group groupName does not exist, it is firstly created as a child of the "root" group.

Parameters
groupNamename of the group in which the shape is created
shapeTypetype of the created shape; see Available Shape Types and Their Parameters
ShapeNamename (unique identifier) given to the new shape.
propertythe list of geometry properties for the new shape
void addTexture ( string  shape,
string  texturePath 
)

Add a texture to the indicated shape.

Note! You need the "simage" libary (extension to COIN3D) to use this function. More information (including the supported image formats, etc) see http://www.coin3d.org/lib/simage

Parameters
shapethe name of the shape to put the texture on
texturePathpath and filename of the texture bitmap.
void delShape ( string  shapeOrGroupName)

Delete a shape or group of shapes.

Deleting the "root" group clears the scene.

Parameters
shapeOrGroupNamename of the shape or group of shapes to delete.
dyn_string getCamera ( )

Gets the actual position and rotation of the camera.

Returns
dyn_string with the format (x, y, z, VrotX, VrotY, VrotZ, Rot). x, y and z are the position vector. VrotX, VrotY and VrotZ are the vector specifying the view direction, and Rot is the rotation (in radians) along the axis specified by the view direction vector.
dyn_string getGroupShapes ( string  groupName)

Gets the shapes inside a group.

Returns
dyn_string with the list of all the shapes of the specified group and recursively all the shapes of all the groups inside the specified group.
dyn_string getShapeInfo ( string  shapeName,
dyn_string  geometry 
)

Gets the list of shape properties

Parameters
shapeNameName of the shape for which properties are queried
geometrydyn_string with the list of property names which are queried; see the list of properties for every shape type in Available Shape Types and Their Parameters
Returns
dyn_string with the values for properties requested in the geometry parameter, in the same order
void seekToShape ( string  name)

Navigate (seek) to specified shape

Parameters
namename of the shape to navigate to
void setBackgroundColor ( string  color)

Change the background color of the scene with a WinCC OA color.

Parameters
colorWinCC OA color name.
void setBackgroundColorRGB ( string  color)

Change the background color of the scene with any RGB color.

Parameters
colorColor specified as a string in the "r,g,b" format, where r,g,b are the values for red, green and blue component, in a range from 0.00 to 1.00. Alternatively, one can also use the standard HTML color coding ("#RRGGBB").
void setCamera ( dyn_string  cameraSettings)

Move the position and the rotation of the camera dyn_string with the format (x,y,z,VrotX, VrotY, VrotZ, Rot), for the new rotation of the camera. Values VrotX, VrotY, VrotZ specify the view direction as a vector (range from -1.00 to 1.00) and Rot specifies the rotation angle along the view direction (in radians).

void setColor ( string  shapeOrGroupName,
string  color 
)

Modify the color of the shape or group of shapes.

Parameters
shapeOrGroupNameName of a group or a shape.
colorWinCC OA color name.
void setColorRGB ( string  shapeOrGroupName,
string  color 
)

Modify the color of the shape or group of shapes, using RGB color

Parameters
shapeOrGroupNameName of a group or a shape.
colorColor of the shape or group, specified as a string in the "r,g,b" format, where r,g,b are the values for red,green and blue component, in a range from 0.00 to 1.00. Alternatively, one can also use the standard HTML color coding ("#RRGGBB") .
void setDecoration ( bool  enable)

Show/hide "decorations" in the widget.

Parameters
enabletrue for show, false for hide.
void setGeometry ( string  shapeOrGroupName,
dyn_string  geometry 
)

Modify the geometrical properties of a shape or group

If you modify the properties of a group, the changes are applied to all its members; note that the function "cascades" to all subgroups, ie. it will also affect all shapes in all subgroups of the specified group.

Parameters
shapeOrGroupNameName of a group or a shape.
geometrydyn_string with the new properties.
void setHeadlight ( bool  on)

Turn the camera headlight on or off

void setSeek ( bool  enable)

Activate the seek mode.

After the seek mode is activated, the camera navigates ("seeks") to the shape that was clicked in the mouse. Note that the seek mode is deactivated after the first click.

Parameters
enabletrue for enable the mode, false for disable.
void setTransparency ( string  shapeOrGroupName,
string  transparency 
)

Modify the transparency of the shape or group of shapes.

Parameters
shapeOrGroupName,:Name of a group or a shape.
transparency,:transparency of the shape or group. Transparency needs to be expressed as a number ranging from 0.00 (completly opaque) to 1.00 (completly trasparent).
void setViewing ( bool  enable)

Switch between the "Viewing" and "Picking" mode of the widget

Parameters
enabletrue for Viewing mode, false for Picking mode.
void shapeClicked ( QString  shapeName,
int  x,
int  y,
int  z,
int  transparency 
)
signal

Event emited when a shape is clicked in the "Picking" mode.

The function related to the shapeClicked event is called when a shape is clicked while the "Picking" mode is active.

The following parameters, describing the clicked object, are passed to it:

Parameters
shapeNamename of the clicked shape.
xcurrent x-position of the shape.
ycurrent y-position of the shape.
zcurrent z-position of the shape.
transparencycurrent transparency of the shape.
void unselect ( )
signal

Event emited when a user click outside any shape in select mode.

void viewAll ( )

Reposition the camera so we can see the complete scene.


The documentation for this class was generated from the following file: