Package org.sunflow.core

# Class Geometry

java.lang.Object
org.sunflow.core.Geometry

All Implemented Interfaces:
  `RenderObject`

public class Geometry extends Object implements RenderObject
This class represent a geometric object in its native object space. These object are not rendered directly, they must be instanced via `Instance`. This class performs all the bookkeeping needed for on-demand tesselation and acceleration structure building.

## Constructor Summary

Constructors
Constructor
Description
`Geometry(PrimitiveList primitives)`
Create a geometry from the specified primitive aggregate.
`Geometry(Tesselatable tesselatable)`
Create a geometry from the specified tesselatable object.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`update(ParameterList pl, SunflowAPI api)`
Update this object given a list of parameters.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### Geometry

public Geometry(Tesselatable tesselatable)
Create a geometry from the specified tesselatable object. The actual renderable primitives will be generated on demand.

Parameters:
  `tesselatable` - tesselation object

### Geometry

public Geometry(PrimitiveList primitives)
Create a geometry from the specified primitive aggregate. The acceleration structure for this object will be built on demand.

Parameters:
  `primitives` - primitive list object

## Method Details

### update

public boolean update(ParameterList pl, SunflowAPI api)
Description copied from interface: `RenderObject`
Update this object given a list of parameters. This method is guarenteed to be called at least once on every object, but it should correctly handle empty parameter lists. This means that the object should be in a valid state from the time it is constructed. This method should also return true or false depending on whether the update was succesfull or not.

Specified by:
  `update` in interface `RenderObject`
Parameters:
  `pl` - list of parameters to read from
  `api` - reference to the current scene
Returns:
  `true` if the update is succesfull, `false` otherwise