C# 클래스 ImageManipulation.OctreeQuantizer.Octree.OctreeNode

Class which encapsulates each node in the tree
파일 보기 프로젝트 열기: fragmer/fCraft

공개 메소드들

메소드 설명
AddColor ( Color32 pixel, int colorBits, int level, Octree octree ) : void

Add a color into the tree.

ConstructPalette ( IList palette, int &currentPaletteIndex ) : void

Traverse the tree, building up the color palette.

GetPaletteIndex ( Color32 pixel, int level ) : int

Return the palette index for the passed color.

Increment ( Color32 pixel ) : void

Increment the pixel count and add to the color information.

OctreeNode ( int level, int colorBits, Octree octree ) : System

Construct the node.

Reduce ( ) : int

Reduce this node by removing all of its children.

메소드 상세

AddColor() 공개 메소드

Add a color into the tree.
public AddColor ( Color32 pixel, int colorBits, int level, Octree octree ) : void
pixel Color32 The color.
colorBits int The number of significant color bits.
level int The level in the tree.
octree Octree The tree to which this node belongs.
리턴 void

ConstructPalette() 공개 메소드

Traverse the tree, building up the color palette.
public ConstructPalette ( IList palette, int &currentPaletteIndex ) : void
palette IList The palette.
currentPaletteIndex int The current palette index.
리턴 void

GetPaletteIndex() 공개 메소드

Return the palette index for the passed color.
public GetPaletteIndex ( Color32 pixel, int level ) : int
pixel Color32
level int
리턴 int

Increment() 공개 메소드

Increment the pixel count and add to the color information.
public Increment ( Color32 pixel ) : void
pixel Color32
리턴 void

OctreeNode() 공개 메소드

Construct the node.
public OctreeNode ( int level, int colorBits, Octree octree ) : System
level int The level in the tree = 0 - 7
colorBits int The number of significant color bits in the image.
octree Octree The tree to which this node belongs.
리턴 System

Reduce() 공개 메소드

Reduce this node by removing all of its children.
public Reduce ( ) : int
리턴 int