Documentation ¶
Index ¶
- Constants
- func B3dmFeatureTableDecode(header map[string]interface{}, buff []byte) map[string]interface{}
- func B3dmFeatureTableEncode(header map[string]interface{}, data map[string]interface{}) []byte
- func ComponentTypeSize(tp string) int
- func ContainerTypeSize(tp string) int
- func GetGltfAttribute(primitive *gltf.Primitive, doc *gltf.Document, name string) ([]interface{}, error)
- func ReadGltfValueAt(gltf *gltf.Document, accesorId, n uint32) []interface{}
- type B3dm
- type B3dmFeatureTable
- type B3dmHeader
- func (h *B3dmHeader) GetBatchTableBinaryByteLength() uint32
- func (h *B3dmHeader) GetBatchTableJSONByteLength() uint32
- func (h *B3dmHeader) GetByteLength() uint32
- func (h *B3dmHeader) GetFeatureTableBinaryByteLength() uint32
- func (h *B3dmHeader) GetFeatureTableJSONByteLength() uint32
- func (h *B3dmHeader) GetSize() int64
- type B3dmReader
- type BatchTable
- type BatchTableValuesEntry
- type BinaryBodyReference
- type FeatureTable
- type Header
Constants ¶
View Source
const ( B3DM_PROP_BATCH_LENGTH = "BATCH_LENGTH" B3DM_PROP_RTC_CENTER = "RTC_CENTER" )
View Source
const ( COMPONENT_TYPE_BYTE = "BYTE" COMPONENT_TYPE_UNSIGNED_BYTE = "UNSIGNED_BYTE" COMPONENT_TYPE_SHORT = "SHORT" COMPONENT_TYPE_UNSIGNED_SHORT = "UNSIGNED_SHORT" COMPONENT_TYPE_INT = "INT" COMPONENT_TYPE_UNSIGNED_INT = "UNSIGNED_INT" COMPONENT_TYPE_FLOAT = "FLOAT" COMPONENT_TYPE_DOUBLE = "DOUBLE" )
View Source
const ( REF_PROP_BYTE_OFFSET = "byteOffset" REF_PROP_COMPONENT_TYPE = "componentType" REF_PROP_TYPE = "type" )
View Source
const ( CONTAINER_TYPE_SCALAR = "SCALAR" CONTAINER_TYPE_VEC2 = "VEC2" CONTAINER_TYPE_VEC3 = "VEC3" CONTAINER_TYPE_VEC4 = "VEC4" )
Variables ¶
This section is empty.
Functions ¶
func B3dmFeatureTableDecode ¶
func B3dmFeatureTableEncode ¶
func ComponentTypeSize ¶
func ContainerTypeSize ¶
func GetGltfAttribute ¶
func ReadGltfValueAt ¶
Types ¶
type B3dm ¶
type B3dm struct { Header B3dmHeader FeatureTable FeatureTable BatchTable BatchTable Model *gltf.Document }
func (*B3dm) GetBatchTable ¶
func (m *B3dm) GetBatchTable() *BatchTable
func (*B3dm) GetFeatureTable ¶
func (m *B3dm) GetFeatureTable() *FeatureTable
func (*B3dm) GetFeatureTableView ¶
func (m *B3dm) GetFeatureTableView() *B3dmFeatureTable
type B3dmFeatureTable ¶
type B3dmHeader ¶
type B3dmHeader struct { Magic [4]byte Version uint32 ByteLength uint32 FeatureTableJSONByteLength uint32 FeatureTableBinaryByteLength uint32 BatchTableJSONByteLength uint32 BatchTableBinaryByteLength uint32 }
func (*B3dmHeader) GetBatchTableBinaryByteLength ¶
func (h *B3dmHeader) GetBatchTableBinaryByteLength() uint32
func (*B3dmHeader) GetBatchTableJSONByteLength ¶
func (h *B3dmHeader) GetBatchTableJSONByteLength() uint32
func (*B3dmHeader) GetByteLength ¶
func (h *B3dmHeader) GetByteLength() uint32
func (*B3dmHeader) GetFeatureTableBinaryByteLength ¶
func (h *B3dmHeader) GetFeatureTableBinaryByteLength() uint32
func (*B3dmHeader) GetFeatureTableJSONByteLength ¶
func (h *B3dmHeader) GetFeatureTableJSONByteLength() uint32
func (*B3dmHeader) GetSize ¶
func (h *B3dmHeader) GetSize() int64
type B3dmReader ¶
type B3dmReader struct {
// contains filtered or unexported fields
}
func NewB3dmReader ¶
func NewB3dmReader(r io.Reader) *B3dmReader
func (*B3dmReader) Decode ¶
func (r *B3dmReader) Decode(m *B3dm) error
func (*B3dmReader) DecodeHeader ¶
func (r *B3dmReader) DecodeHeader(d *B3dmHeader) error
type BatchTable ¶
type BatchTableValuesEntry ¶
type BatchTableValuesEntry []interface{}
type BinaryBodyReference ¶
type BinaryBodyReference struct { ByteOffset uint32 `json:"byteOffset"` ComponentType string `json:"componentType,omitempty"` ContainerType string `json:"type,omitempty"` }
func (*BinaryBodyReference) FromMap ¶
func (r *BinaryBodyReference) FromMap(d map[string]interface{})
type FeatureTable ¶
type FeatureTable struct { Header map[string]interface{} Data map[string]interface{} // contains filtered or unexported fields }
func (*FeatureTable) GetBatchLength ¶
func (h *FeatureTable) GetBatchLength() int
Click to show internal directories.
Click to hide internal directories.