CHAPTER 2 ■ SETTING UP DIFFERENT CAMERA MODES IN YOUR 3D WORLD
93
public Vector3 Position { get { return position; } }
public Model Model { get { return model; } }
public int ModelID { get { return modelID; } }
Getter methods were introduced in .NET 2.0. They are small methods that simply return
thecorrespondingproperty.You’llseetheiruseinafewminutes.Fornow,notetheoutside
program can retrieve only the values of these properties; they cannot be set from the outside,
andthat’sexactlyhowthingsshouldbe.
There’sonemorepropertyyoudon’thaveaccesstofromtheoutside:worldMatrix. You
mustprovidethemainprogramwithawaytoupdatetheobject’sworldMatrix property. So
here,youwilldefinenotonlyagettermethodbutalsoasettermethod.Inthiscase,thissetter ...