flaw-visual-0.1.0.0

LicenseMIT
Safe HaskellNone
LanguageHaskell2010

Flaw.Visual.Geometry

Description

 
Synopsis

Documentation

data PackedGeometry Source #

Instances
Generic PackedGeometry Source # 
Instance details

Defined in Flaw.Visual.Geometry

Associated Types

type Rep PackedGeometry :: Type -> Type #

Serialize PackedGeometry Source # 
Instance details

Defined in Flaw.Visual.Geometry

type Rep PackedGeometry Source # 
Instance details

Defined in Flaw.Visual.Geometry

type Rep PackedGeometry = D1 (MetaData "PackedGeometry" "Flaw.Visual.Geometry" "flaw-visual-0.1.0.0-GEzxBFj9QBv1go1Jw4RpbA" False) (C1 (MetaCons "PackedGeometry" PrefixI True) ((S1 (MetaSel (Just "packedGeometryVerticesBytes") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ByteString) :*: (S1 (MetaSel (Just "packedGeometryIndicesBytes") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ByteString) :*: S1 (MetaSel (Just "packedGeometryIndicesCount") SourceUnpack SourceStrict DecidedStrict) (Rec0 Int))) :*: (S1 (MetaSel (Just "packedGeometryVertexStride") SourceUnpack SourceStrict DecidedStrict) (Rec0 Int) :*: (S1 (MetaSel (Just "packedGeometryIndexTopology") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 IndexTopology) :*: S1 (MetaSel (Just "packedGeometryIndexStride") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 IndexStride)))))

packGeometry :: (Ord a, Storable a, Vector v a, Vector v Word32) => v a -> PackedGeometry Source #

Pack raw vertices.

packIndexedGeometry :: (Storable a, Vector v a) => v a -> Vector Word32 -> PackedGeometry Source #

Pack geometry with indices. Chooses indices format.

loadPackedGeometry :: Device d => d -> PackedGeometry -> IO (Geometry d, IO ()) Source #

Load geometry into device.

emitGeometryAsset :: FilePath -> ColladaM ColladaElement -> Q ByteString Source #

Pack geometry into bytestring.

loadGeometryAsset :: Device d => d -> ByteString -> IO (Geometry d, IO ()) Source #

Load geometry from bytestring.

indexGeometryVertices :: (Ord a, Vector v a, Vector v Word32) => v a -> (v a, Vector Word32) Source #

Create indices for raw vertices.