#include <bone/FishSlice.hpp>
#include <bone/FishGrid.hpp>
#include <bone/FishField.hpp>
#include <grid/types/TriangularSurface.hpp>
namespace
{
class VComputeNormals :
public virtual VObject,
public virtual Fish<Fiber::Slice>,
public virtual Fish<Fiber::Grid>
{
public:
{
}
, theNormalVectorField( self(), "Normals")
{
}
bool update(
VRequest&R,
double precision)
override;
};
{
if (!G)
{
printf("ComputeNormals: update(): No grid!\n");
return true;
}
{
puts(
"already have normals");
return true;
}
if (!Coords)
{
return true;
}
if (!CellsAsVertices)
{
puts(
"VComputeNormals: No cells as vertices found");
return true;
}
VertexNormals =
TriangularSurface::computeVertexNormals(
Coords->getData(),
CellsAsVertices->getPositions()->getData()
);
(*G)[ TriangularSurface::NormalVectorFieldName ] =
new Field( VertexNormals );
return true;
}
}
namespace
{
Description(
"Compute normal vectors of a triangular surface." ) +
Url(
"http://vish.fiberbundle.net/wiki" ),
ObjectQuality::EXPERIMENTAL );
}
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
An internal class that stores a couple of textual names.
Definition FieldSelector.hpp:18
A Field is a collection of CreativeArrayBase reference pointers which are accessed via FragmentID obj...
Definition Field.hpp:245
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2
note: cannot derive from FloatingSkeletonRenderer as long as independent base class TriangleRenderer ...
Definition fs/init.hpp:20