Table of Contents

Class WorldXmlSerializer

Namespace
Alis.Core.Physic.Common
Assembly
Alis.dll

The world xml serializer class

internal static class WorldXmlSerializer

Inheritance

Inherited Members

Fields

_writer

The writer

private static XmlWriter _writer

Field Value

XmlWriter

Methods

FloatToString(float)

Floats the to string using the specified value

private static string FloatToString(float value)

Parameters

value float

The value

Returns

string

The string

Serialize(World, Stream)

Serializes the world

internal static void Serialize(World world, Stream stream)

Parameters

world World

The world

stream Stream

The stream

SerializeBody(List<Fixture>, List<Shape>, Body)

Serializes the body using the specified fixtures

private static void SerializeBody(List<Fixture> fixtures, List<Shape> shapes, Body body)

Parameters

fixtures List<Fixture>

The fixtures

shapes List<Shape>

The shapes

body Body

The body

SerializeFixture(List<Fixture>, Fixture)

Serializes the fixture using the specified fixtures

private static void SerializeFixture(List<Fixture> fixtures, Fixture fixture)

Parameters

fixtures List<Fixture>

The fixtures

fixture Fixture

The fixture

SerializeJoint(List<Body>, Joint)

Serializes the joint using the specified bodies

private static void SerializeJoint(List<Body> bodies, Joint joint)

Parameters

bodies List<Body>

The bodies

joint Joint

The joint

Exceptions

Exception

Gear joint not supported by serialization

Exception

Joint not supported

SerializeShape(Shape)

Serializes the shape using the specified shape

private static void SerializeShape(Shape shape)

Parameters

shape Shape

The shape

Exceptions

Exception

WriteDynamicType(Type, object)

Writes the dynamic type using the specified type

private static void WriteDynamicType(Type type, object val)

Parameters

type Type

The type

val object

The val

WriteElement(string, Vector2)

Writes the element using the specified name

private static void WriteElement(string name, Vector2 vec)

Parameters

name string

The name

vec Vector2

The vec

WriteElement(string, int)

Writes the element using the specified name

private static void WriteElement(string name, int val)

Parameters

name string

The name

val int

The val

WriteElement(string, bool)

Writes the element using the specified name

private static void WriteElement(string name, bool val)

Parameters

name string

The name

val bool

The val

WriteElement(string, float)

Writes the element using the specified name

private static void WriteElement(string name, float val)

Parameters

name string

The name

val float

The val