Inherits from NSObject
Declared in CC3ModelSampleFactory.h

Overview

CC3ModelSampleFactory is a convenience utility for creating sample 3D models for experimentation.

The design pattern is a singleton factory object, with methods for creating instances of various 3D models. Access to the factory instance is through the factory class method.

This class should be considered for testing and experimental use only. Unless you really need teapots in your application, there is no need to include this class, or the teapot.h data header file, in any finished application. Doing so will just bloat the size of the application unnecessarily.

Properties

multicoloredTeapotMesh

An instance of a teapot mesh that includes a vertex color array.

@property (nonatomic, retain, readonly) CC3Mesh *multicoloredTeapotMesh

Declared In

CC3ModelSampleFactory.h

texturedTeapotMesh

An instance of a teapot mesh that includes a texture coordinate map.

@property (nonatomic, retain, readonly) CC3Mesh *texturedTeapotMesh

Declared In

CC3ModelSampleFactory.h

unicoloredTeapotMesh

An instance of a teapot mesh that will be covered in a single color.

@property (nonatomic, retain, readonly) CC3Mesh *unicoloredTeapotMesh

Declared In

CC3ModelSampleFactory.h

Class Methods

deleteFactory

Deletes the factory singleton, to clear items from memory.

+ (void)deleteFactory

Declared In

CC3ModelSampleFactory.h

factory

Returns the singleton instance.

+ (CC3ModelSampleFactory *)factory

Declared In

CC3ModelSampleFactory.h

Instance Methods

makeMultiColoredTeapotNamed:

Returns an allocated, initialized, autoreleased instance of a teapot painted with a funky color gradient.

- (CC3MeshNode *)makeMultiColoredTeapotNamed:(NSString *)aName

Declared In

CC3ModelSampleFactory.h

makeTexturableTeapotNamed:

Returns an allocated, initialized, autoreleased instance of a teapot suitable for covering with a texture.

- (CC3MeshNode *)makeTexturableTeapotNamed:(NSString *)aName

Declared In

CC3ModelSampleFactory.h

makeUniColoredTeapotNamed:withColor:

Returns an allocated, initialized, autoreleased instance of a teapot in a particular color.

- (CC3MeshNode *)makeUniColoredTeapotNamed:(NSString *)aName withColor:(ccColor4F)color

Declared In

CC3ModelSampleFactory.h