Page 254 - DCAP404 _Object Oriented Programming
P. 254
Unit 11: Pointers and Dynamic Memory Management
Notes
memory
vibhor
marks
prashant
marks
setMarks(student *this, int a)
{ marks=a }
When vibhor calls setMarks, a pointer to vibhor is passed to setMarks telling it that it is object
vibhor and not prashant that called setMarks.
Self Assessment
Fill in the blanks:
11. Dynamically allocated memory is kept on the …………………… .
12. Declarations are used to …………………… allocate memory, the new operator is used to
dynamically allocate memory.
13. The …………………… operator performs pointer arithemtic and de-references the resulting
pointer.
14. A static member function does not have a ………………. pointer.
15. The type of the this pointer for a member function of a class type X, is ……………. const.
Caselet Almost in the Maker’s Shoes
rt is lies that tell the truth, said Piccaso. Art is art; everything else is everything
else, said Ad Reinhardt. Art completes what nature cannot bring to finish, is an
AAristotle quote.
If art imitates life, one form of such exercise is animation. Peter Ratner’s “3-D Human
Modeling and Animation” has all the tools and know-how “to create digital characters
that can move, express emotions and talk”. The book demonstrates how you can use your
artistic skills in figure drawing, painting, and sculpture to create animated human figures
using the latest computer technology. “No one has been able to make computer graphics
humans that have been mistaken for real ones in movies and photos when viewed at close
range,” states the preface. “Until technology evolves to the point that this becomes possible,
creating an artistic representation of a human is still a worthwhile goal.” A few frames
from the book:
The closer a character becomes to an everyday human, the more ordinary it will appear.
Synthetic humans most often lack personality. Computer characters that try to mimic
human movement through unedited motion-capture techniques generally look like puppets
Contd...
LOVELY PROFESSIONAL UNIVERSITY 247