Comments (7)
@tomkcook do you have any docs/examples for this class?
from pivy.
@looooo for which class?
from pivy.
SoCoordinateElement
from pivy.
No. This is what's in the documentation for SoCoordinateElement:
The SoCoordinateElement class is yet to be documented.
FIXME: write doc.
The approach I'm taking comes from SoVertexShape.cpp, SoVertexShape::getVertexData(...)
.
from pivy.
SoVertexShape::getVertexData(...):
Convenience method that returns the current coordinate and normal
element. This method is not part of the Open Inventor API.
Do you know what "current" refers to? Maybe someone from the coin-maintainers can help? @VolkerEnderlein
from pivy.
"Current" here refers to the state of scenegraph traversal. This is used in objects such as SoIndexedPointSet
which don't have their own vertex data but take the vertex data from the scenegraph state; they refer to the SoCoordinate3 object nearest above them in the scenegraph hierarchy for their coordinate data. The documentation for SoState
has a reasonable explanation of how this works.
TBH I'm not sure if this is a bug or how it's expected to work, and if it is a bug, whether it's a bug in Pivy or in Coin3D. I happen to have come at it via Pivy so I filed a ticket here, but I'm happy to be redirected to Coin3D if that's where the problem is.
from pivy.
In the C++ API of Coin3d a convenience macro SO_ENABLE is provided to register an element type to an action type. Since pivy (as far as I can see) lacks of this macro you must implement it yourself as a function:
def SO_ENABLE(action, element):
action.enableElement(element.getClassTypeId(), element.getClassStackIndex())
An SoEventCallback node internally uses an SoHandleEventAction to transport an SoEvent. So, in order to allow to access the SoCoordinateElement from within your event handler you must add this line to your code
SO_ENABLE(coin.SoHandleEventAction, coin.SoCoordinateElement)
For more details have a look at The Inventor Toolmaker: http://www-evasion.imag.fr/Membres/Francois.Faure/doc/inventorToolmaker/sgi_html/ch02.html#id5444406
from pivy.
Related Issues (20)
- SoGui.init(sys.argv[0]) run error HOT 6
- 'pivy._coin' has no attribute 'delete_SoGeo' HOT 7
- circular import error HOT 16
- Possible to SegFault SoPerspectiveCamera.getMatrix
- Pivy fails to build with Python 3.12 HOT 4
- Pivy failes to build with Python 3.13 HOT 4
- ImportError: cannot import name 'QActionGroup' from 'pivy.qt.QtWidgets' HOT 5
- New/delete vs malloc/free HOT 3
- move to github actions and build for multiple python versions
- Transfer ownership of PyPi entry HOT 2
- How do you recommend projects find pivy using CMake ? (Is there a Findpivy.cmake?) HOT 4
- Recursion in SoBaseKit.__getattr__ HOT 4
- Pivy Python 3.10/3.11 compatibility? HOT 16
- unable to open file "...\Coin3D\lib\Coin4.lib" HOT 1
- Neither setup.py nor CMake build works without issues
- Could not find a package configuration file provided by "Coin" HOT 4
- macos build failure using cmake HOT 20
- SoVMRLTransform.setMatrix doesn't accept a parameter
- FreeCAD fails SIGSEGV, some pivy tests/ FAIL, one fails with SIGSEGV HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pivy.