Another simple way of calculating the volume of a arbitary closed 3d mesh is
Choose an arbitary point ( let's call it o )
For each triangle with vertices ( a,b,c )
Calculate the volume of the tetrahedron ( a,b,c,o ) using a scalar triple
product ( ((b-a)x(c-a)).(o-a)/3 ).
Add the volumes of
Hi Ferdi,
I did make a first pass at this, at least in terms of reusing modules in
different shaders.
The glsl functionality has most the same tools as a C compiler. But is
missing a few things.
osg::Shader provides some the functionality C compiler and some
functionality of the preprocessor (
Hello,
I'm using a geometry shader to do particle animation for a splash
special effect. I am using a few uniforms, one of which is the time at
which the splash starts and others that contain values that are shared
among the different splashes.
I am applying the StateSet containing the
, Colin (GE EntSol,
Intelligent Platforms) [EMAIL PROTECTED] wrote:
Hello,
I'm using a geometry shader to do particle animation for a splash
special effect. I am using a few uniforms, one of which is the time at
which the splash starts and others that contain values that are shared
among
Hi all,
My colleague was recently doing some debugging and found that when
OSG_NOTIFY_LEVEL is INFO or higher all of the shader code comes out as
debug. Luckily because of the way the osg::notify code is written we can
prevent any slightly osg savvy 3rd party getting hold of my shaders by
setting
and source code, so even if someone did snoop and then
reuse your work they would be open to a lawsuit.
Robert
On Wed, Sep 24, 2008 at 10:46 AM, Middleton, Colin (GE EntSol,
Intelligent Platforms) [EMAIL PROTECTED] wrote:
Hi all,
My colleague was recently doing some debugging and found that when
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Robert Osfield
The pole looks weird. Is there any way to fix it?
Poles are little bit awkward to fix with the simple quad tree
approach used by the OSG (and many other whole whole
techniques.)
I think my data items are going to be per Geode (e.g.,
thickness of a
part), but I thought I still needed shader attributes instead of
uniforms, because uniforms are per frame. Unless you're
thinking I'd
make an array of them where the indexing is the Geodes?
Nope, you can
Attributes provide a faster way of changing vertex
properties even on
a per object basis, as it means all of your objects can
share the same
state. Changing the value of uniforms cause the creation of
a new state.
Lots of state changes can be very expensive.
Sure, but some
As well as hardware state
changes he also talks about the CPU cost of doing the
sorting being an
issue. That was what my suggestion will help with as it
means that OSG
has less states to sort, as all objects of the same type
will have the
same state as opposed to having state
What I need to do is invert the rotation.
I'm not aware of a invert functionality on Quat but you could
create a rotation matrix from the Quat, invert that, and get
a quaternion back.
All quaternions contains a vector ( x,y,z ) and a scalar (w ).
For a rotation quaternion the
11 matches
Mail list logo