Supporting Objects
These are objects that are used by other components in the library.
ID's
penne.ID
Bases: NamedTuple
Base class for all ID's
Each ID is composed of a slot and a generation, resulting in a tuple like id ex. (0, 0). Both are positive integers that are filled in increasing order. Slots are taken first, but once the slot is freed, it can be used with a new generation. For example, a method is created -> (0, 0), then another is created -> (1, 0), then method (0, 0) is deleted. Now, the next method created will be (0, 1).
Attributes:
Name | Type | Description |
---|---|---|
slot |
int
|
Slot of the ID |
gen |
int
|
Generation of the ID |
penne.MethodID
Bases: ID
ID specific to methods
penne.SignalID
Bases: ID
ID specific to signals
penne.EntityID
Bases: ID
ID specific to entities
penne.PlotID
Bases: ID
ID specific to plots
penne.BufferID
Bases: ID
ID specific to buffers
penne.BufferViewID
Bases: ID
ID specific to buffer views
penne.MaterialID
Bases: ID
ID specific to materials
penne.ImageID
Bases: ID
ID specific to images
penne.TextureID
Bases: ID
ID specific to textures
penne.SamplerID
Bases: ID
ID specific to samplers
penne.LightID
Bases: ID
ID specific to lights
penne.GeometryID
Bases: ID
ID specific to geometries
penne.TableID
Bases: ID
ID specific to tables
Enums for Specific String Options
penne.AttributeSemantic
Bases: Enum
String indicating type of attribute, used in Attribute inside of geometry patch
Takes value of either POSITION, NORMAL, TANGENT, TEXTURE, or COLOR
penne.Format
Bases: Enum
String indicating format of byte data for an attribute
Used in Attribute inside of geometry patch. Takes value of either U8, U16, U32, U8VEC4, U16VEC2, VEC2, VEC3, VEC4, MAT3, or MAT4
penne.IndexFormat
Bases: str
, Enum
String indicating format of byte data for an index
Used in Index inside of geometry patch. Takes value of either U8, U16, or U32
penne.PrimitiveType
Bases: Enum
String indicating type of primitive used in a geometry patch
Takes value of either POINTS, LINES, LINE_LOOP, LINE_STRIP, TRIANGLES, or TRIANGLE_STRIP
penne.ColumnType
Bases: str
, Enum
String indicating type of data stored in a column in a table
Used in TableColumnInfo inside TableInitData. Takes value of either TEXT, REAL, or INTEGER
penne.BufferType
Bases: str
, Enum
String indicating type of data stored in a buffer
Used in BufferView. Takes value of either UNK, GEOMETRY, or IMAGE
penne.SamplerMode
Bases: Enum
String options for sampler mode
Used in Sampler. Takes value of either CLAMP_TO_EDGE, MIRRORED_REPEAT, or REPEAT
penne.MagFilterTypes
Bases: Enum
Options for magnification filter type
Used in Sampler. Takes value of either NEAREST or LINEAR
penne.MinFilterTypes
Bases: Enum
Options for minification filter type
Used in Sampler. Takes value of either NEAREST, LINEAR, or LINEAR_MIPMAP_LINEAR
Supporting Objects
penne.SelectionRange
Bases: NoodleObject
Range of rows to select in a table
Attributes:
Name | Type | Description |
---|---|---|
key_from_inclusive |
int
|
First row to select |
key_to_exclusive |
int
|
Where to end selection, exclusive |
penne.Selection
Bases: NoodleObject
Selection of rows in a table
Attributes:
Name | Type | Description |
---|---|---|
name |
str
|
Name of selection |
rows |
List[int]
|
List of rows to select |
row_ranges |
List[SelectionRange]
|
List of ranges of rows to select |
penne.MethodArg
Bases: NoodleObject
Argument for a method
Attributes:
Name | Type | Description |
---|---|---|
name |
str
|
Name of argument |
doc |
str
|
Documentation for argument |
editor_hint |
str
|
Hint for editor, refer to message spec for hint options |
penne.BoundingBox
Bases: NoodleObject
Axis-aligned bounding box
Attributes:
Name | Type | Description |
---|---|---|
min |
Vec3
|
Minimum point of bounding box |
max |
Vec3
|
Maximum point of bounding box |
penne.TextRepresentation
Bases: NoodleObject
Text representation for an entity
Attributes:
Name | Type | Description |
---|---|---|
txt |
str
|
Text to display |
font |
str
|
Font to use |
height |
Optional[float]
|
Height of text |
width |
Optional[float]
|
Width of text |
penne.WebRepresentation
Bases: NoodleObject
Web page with a given URL rendered as a plane
Attributes:
Name | Type | Description |
---|---|---|
source |
str
|
URL for entity |
height |
Optional[float]
|
Height of plane |
width |
Optional[float]
|
Width of plane |
penne.InstanceSource
Bases: NoodleObject
Source of instances for a geometry patch
Attributes:
Name | Type | Description |
---|---|---|
view |
BufferViewID
|
View of mat4 |
stride |
int
|
Stride for buffer, defaults to tightly packed |
bb |
BoundingBox
|
Bounding box of instances |
penne.RenderRepresentation
Bases: NoodleObject
Render representation for an entity
Attributes:
Name | Type | Description |
---|---|---|
mesh |
GeometryID
|
Mesh to render |
instances |
Optional[InstanceSource]
|
Source of instances for mesh |
penne.TextureRef
Bases: NoodleObject
Reference to a texture
Attributes:
Name | Type | Description |
---|---|---|
texture |
TextureID
|
Texture to reference |
transform |
Optional[Mat3]
|
Transform to apply to texture |
texture_coord_slot |
Optional[int]
|
Texture coordinate slot to use |
penne.PBRInfo
Bases: NoodleObject
Physically based rendering information for a material
Attributes:
Name | Type | Description |
---|---|---|
base_color |
Optional[RGBA]
|
Base color of material |
base_color_texture |
Optional[TextureRef]
|
Texture to use for base color |
metallic |
Optional[float]
|
Metallic value of material |
roughness |
Optional[float]
|
Roughness value of material |
metal_rough_texture |
Optional[TextureRef]
|
Texture to use for metallic and roughness |
penne.PointLight
Bases: NoodleObject
Point light information for a light delegate
Attributes:
Name | Type | Description |
---|---|---|
range |
float
|
Range of light, -1 defaults to infinite |
penne.SpotLight
Bases: NoodleObject
Spotlight information for a light delegate
Attributes:
Name | Type | Description |
---|---|---|
range |
float
|
Range of light, -1 defaults to infinite |
inner_cone_angle_rad |
float
|
Inner cone angle of light |
outer_cone_angle_rad |
float
|
Outer cone angle of light |
penne.DirectionalLight
Bases: NoodleObject
Directional light information for a light delegate
Attributes:
Name | Type | Description |
---|---|---|
range |
float
|
Range of light, -1 defaults to infinite |
penne.Attribute
Bases: NoodleObject
Attribute for a geometry patch
Each attribute is a view into a buffer that corresponds to a specific element of the mesh (e.g. position, normal, etc.). Attributes allow information for the vertices to be extracted from buffers
Attributes:
Name | Type | Description |
---|---|---|
view |
BufferViewID
|
View of the buffer storing the data |
semantic |
AttributeSemantic
|
String describing the type of attribute |
channel |
Optional[int]
|
Channel of attribute, if applicable |
offset |
Optional[int]
|
Offset into buffer |
stride |
Optional[int]
|
Distance, in bytes, between data for two vertices in the buffer |
format |
Format
|
How many bytes per element, how to decode the bytes |
minimum_value |
Optional[List[float]]
|
Minimum value for attribute data |
maximum_value |
Optional[List[float]]
|
Maximum value for attribute data |
normalized |
Optional[bool]
|
Whether to normalize the attribute data |
penne.Index
Bases: NoodleObject
Index for a geometry patch
The index is a view into a buffer that corresponds to the indices of the mesh. The index allows the mesh to connect vertices and render triangles, lines, or points.
Attributes:
Name | Type | Description |
---|---|---|
view |
BufferViewID
|
View of the buffer storing the data |
count |
int
|
Number of indices |
offset |
Optional[int]
|
Offset into buffer |
stride |
Optional[int]
|
Distance, in bytes, between data for two elements in the buffer |
format |
IndexFormat
|
How many bytes per element, how to decode the bytes |
penne.GeometryPatch
Bases: NoodleObject
Geometry patch for a mesh
Principle object used in geometry delegates. A geometry patch combines vertex data from attributes and index data from indices.
Attributes:
Name | Type | Description |
---|---|---|
attributes |
List[Attribute]
|
List of attributes storing vertex data for the mesh |
vertex_count |
int
|
Number of vertices in the mesh |
indices |
Optional[Index]
|
Indices for the mesh |
type |
PrimitiveType
|
Type of primitive to render |
material |
MaterialID
|
Material to use for rendering |
penne.InvokeIDType
penne.TableColumnInfo
Bases: NoodleObject
Information about a column in a table
Attributes:
Name | Type | Description |
---|---|---|
name |
str
|
Name of column |
type |
ColumnType
|
Type data in the column |
penne.TableInitData
Bases: NoodleObject
Init data to create a table
Attributes:
Name | Type | Description |
---|---|---|
columns |
List[TableColumnInfo]
|
List of column information |
keys |
List[int]
|
List of column indices that are keys |
data |
List[List[Any]]
|
List of rows of data |
selections |
Optional[List[Selection]]
|
List of selections to apply to table |
penne.MethodException
Bases: NoodleObject
Exception raised when invoking a method
Will be sent as part of a reply message
Attributes:
Name | Type | Description |
---|---|---|
code |
int
|
error code |
message |
str
|
error message |
data |
Any
|
data associated with the error |