Open Inventor Reference
SoTransformManip.h
Go to the documentation of this file.
1/*
2 *
3 * Copyright (C) 2000 Silicon Graphics, Inc. All Rights Reserved.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * Further, this software is distributed without any warranty that it is
16 * free of the rightful claim of any third person regarding infringement
17 * or the like. Any license provided herein, whether implied or
18 * otherwise, applies only to this software file. Patent licenses, if
19 * any, provided herein do not apply to combinations of this program with
20 * other software, or any other product whatsoever.
21 *
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with this library; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 *
26 * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
27 * Mountain View, CA 94043, or:
28 *
29 * http://www.sgi.com
30 *
31 * For further information regarding this notice, see:
32 *
33 * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
34 *
35 */
36
37
38/*
39 * Copyright (C) 1990,91,92 Silicon Graphics, Inc.
40 *
41 _______________________________________________________________________
42 ______________ S I L I C O N G R A P H I C S I N C . ____________
43 |
44 | $Revision: 1.1.1.1 $
45 |
46 | Description:
47 | This file defines manipulators for transform nodes.
48 | they are subclassed from SoTransform.
49 |
50 | Author(s): Paul Isaacs
51 |
52 ______________ S I L I C O N G R A P H I C S I N C . ____________
53 _______________________________________________________________________
54 */
55
56#ifndef _SO_TRANSFORM_MANIP_
57#define _SO_TRANSFORM_MANIP_
58
59#include <Inventor/SbLinear.h>
63
66
162
164{
166
167 public:
168
171
178
200 bool replaceNode( SoPath *p );
219 bool replaceManip(SoPath *p, SoTransform *newOne ) const;
220
221 SoEXTENDER public:
222
228 virtual void doAction( SoAction *action );
229 virtual void callback( SoCallbackAction *action );
230 virtual void GLRender( SoGLRenderAction *action );
231 virtual void getBoundingBox( SoGetBoundingBoxAction *action );
232 virtual void getMatrix(SoGetMatrixAction *action );
233 virtual void handleEvent( SoHandleEventAction *action );
234 virtual void pick( SoPickAction *action );
235 virtual void search( SoSearchAction *action );
236
237 SoINTERNAL public:
238 static void initClass();
239
240 virtual SoChildList *getChildren() const;
241
242 protected:
243
245 virtual void copyContents(const SoFieldContainer *fromFC,
246 bool copyConnections);
247
248 static void transferFieldValues( const SoTransform *from, SoTransform *to);
249
250 static void valueChangedCB(void *,SoDragger *);
251
257 static void fieldSensorCB(void *, SoSensor *);
258
259 virtual void setDragger( SoDragger *newDragger );
260
262
264
265 private:
266 int getNumChildren() const { return (children->getLength()); }
267};
268
269#endif /* _SO_TRANSFORM_MANIP_ */
#define SoEXTENDER
Provide inline template functions for abs, swap, min, max, and clamp.
Definition SbBasic.h:154
#define SoINTERNAL
Definition SbBasic.h:155
#define INVENTOR_API
Disable some annoying warnings on MSVC 6.
Definition SbSystem.h:77
#define SO_NODE_HEADER(className)
Non-abstract classes have everything abstract classes have, plus a way to create an instance.
Definition SoSubNode.h:170
int getLength() const
Returns number of pointers in list.
Definition SbPList.h:110
Abstract base class for all actions.
Definition SoAction.h:179
Performs a generic traversal of the scene graph.
This class maintains a list of child nodes for any node.
Definition SoChildList.h:83
Base class for nodekits that move in response to click-drag-release mouse events.
Definition SoDragger.h:225
Abstract base class for objects that contain fields.
Sensor class that can be attached to Inventor fields.
Renders a scene graph using OpenGL.
Computes bounding box of a scene.
Computes transformation matrix for subgraph.
Allows nodes in a graph to receive input events.
Path that points to a list of hierarchical nodes.
Definition SoPath.h:109
Abstract base class for picking objects in a scene.
Searches for nodes in a scene graph.
Abstract base class for Inventor sensors.
Definition SoSensor.h:108
Base class for all transform Nodes with built-in 3D user interfaces.
SoDragger * getDragger()
Returns a pointer to the dragger being used by this manipulator.
SoFieldSensor * scaleFieldSensor
virtual void GLRender(SoGLRenderAction *action)
These virtual functions implement all of the actions for nodes, Most of the default implementations d...
bool replaceNode(SoPath *p)
Replaces the tail of the path with this manipulator.
SoFieldSensor * scaleOrientFieldSensor
virtual void getBoundingBox(SoGetBoundingBoxAction *action)
static void transferFieldValues(const SoTransform *from, SoTransform *to)
virtual void search(SoSearchAction *action)
virtual void callback(SoCallbackAction *action)
SoFieldSensor * centerFieldSensor
bool replaceManip(SoPath *p, SoTransform *newOne) const
Replaces the tail of the path, which must be this manipulator, with the given SoTransform node.
virtual void setDragger(SoDragger *newDragger)
static void initClass()
initialize the class
SoChildList * children
virtual void handleEvent(SoHandleEventAction *action)
SoFieldSensor * rotateFieldSensor
static void fieldSensorCB(void *, SoSensor *)
SoFieldSensor * translFieldSensor
virtual void getMatrix(SoGetMatrixAction *action)
virtual ~SoTransformManip()
static void valueChangedCB(void *, SoDragger *)
SoTransformManip()
Constructor.
virtual void copyContents(const SoFieldContainer *fromFC, bool copyConnections)
Redefines this to also copy the dragger.
virtual void pick(SoPickAction *action)
virtual void doAction(SoAction *action)
These functions implement all actions for nodekits.
virtual SoChildList * getChildren() const
Returns pointer to children, or NULL if none.
General 3D geometric transformation node.