Pyramid object
'an image pyramid class VBPyramid
'this can also be used to load and store images, though other classes would be preferable if the pyramid levels aren't needed.
'loadimage() 'from a vbimage object
'SetImage()
'GetImage() 'get a copy of the first(original image) level.
'eval() 'get the pixel at the homoginous coordinates
'look in here if the image does not use a full pathname.
'You have to set this before using it...
DefaultPath As String
MipMapCreation As Boolean 'we can just use this to store a single image, or we can create mip map levels. Users choice.
initialized As Boolean
'this is the width and height of the original image
Width As Long
Height As Long
levels As Long
MakeNormalMap As Boolean
'return a bump normal in r,g,b
Function EvalBump(ByVal U As Single, ByVal v As Single, ByVal Spot As Single, r As Single, g As Single, b As Single, ByVal mode As Long, Optional ByVal normalized As Boolean = False)
'get pixel at u,v in homoginous (0-1) coordinates into r,g,b.
'"w" is the "z" value from the camera, or the mip map level to use.
Function Eval(ByVal U As Single, ByVal v As Single, ByVal Spot As Single, r As Single, g As Single, b As Single, ByVal mode As Long, Optional ByVal normalized As Boolean = False)
Function LoadPicture(FileName As String) As Long
Sub Make()
Sub SetImage(ByVal w As Long, ByVal h As Long, rbuf() As Byte, gbuf() As Byte, bbuf() As Byte)
'get a copy of the original image.
'this can be +1 or not, because we just copy from it.
'an image of a different size will be cropped though, so be aware.
Sub GetImage(rbuf() As Byte, bbuf() As Byte, gbuf() As Byte)