Click here to Skip to main content
15,915,093 members
Home / Discussions / C#
   

C#

 
GeneralRe: Creating a control at runtime ! Pin
Xmen Real 22-Feb-08 1:33
professional Xmen Real 22-Feb-08 1:33 
GeneralRe: Creating a control at runtime ! Pin
Bhimuni24-Feb-08 20:50
Bhimuni24-Feb-08 20:50 
GeneralRe: Creating a control at runtime ! Pin
Xmen Real 25-Feb-08 0:06
professional Xmen Real 25-Feb-08 0:06 
GeneralRe: Creating a control at runtime ! Pin
darkelv22-Feb-08 1:51
darkelv22-Feb-08 1:51 
QuestionRe: Creating a control at runtime ! Pin
Bhimuni25-Feb-08 1:11
Bhimuni25-Feb-08 1:11 
Questionhow secure is the key container Pin
poqeqw22-Feb-08 1:21
poqeqw22-Feb-08 1:21 
AnswerRe: how secure is the key container Pin
Mike Dimmick22-Feb-08 1:45
Mike Dimmick22-Feb-08 1:45 
QuestionProblem serializing large datastructure Pin
Schokoolero22-Feb-08 0:34
Schokoolero22-Feb-08 0:34 
I am using a datastructure that represents a triangle mesh. It contains a list of 3D-vertices, a list of triangles (indices of the vertices used for the triangle), a list of edges (also indices) and some additional data. Each triangle has a 3D-vertex attached to it (the normal vector), so does each vertex. The angles and the area are also stored with every triangle. And every vertex stores the principal curvatures and their directions (as 3D-vertices). Every vertex stores a list of adjacent triangles and a list of neighboring vertices (also as indices).

All of that is not a problem for serialization. But I also need to store the distances from every vertex to every other vertex (to calculate the curvatures). I do this by storing the distance from one vertex to every vertex preceding it in the list of vertices with that vertex, so there is no redundance. (I tried a single array for all the distances, but it was too much and I got an OutOfMemoryException.)

My sample mesh contains 11703 vertices, 23402 triangles and 35103 edges, but the program should be capable of handling meshes a lot larger. I originally used doubles, as most of the "Math" methods return doubles. But I switched to float to save memory.
Now the program uses about 500MB of my 2GB of memory.

The distances are still too much for the serialization. (I tried storing just the distances using a StreamWriter and WriteLine and got a txt-file larger than 1GB, which is way too large.)
Serialization always throws an OutOfMemoryException. (I used binary serialization and GZip-Compression.)

Does anyone know a way of serializing such large datastructures?
GeneralFocus on selected item in listview Pin
Xmen Real 22-Feb-08 0:31
professional Xmen Real 22-Feb-08 0:31 
GeneralRe: Focus on selected item in listview Pin
phannon8622-Feb-08 0:39
professionalphannon8622-Feb-08 0:39 
GeneralRe: Focus on selected item in listview Pin
Xmen Real 22-Feb-08 1:06
professional Xmen Real 22-Feb-08 1:06 
Generalproblem in file deletion Pin
Miss Maheshwari22-Feb-08 0:03
Miss Maheshwari22-Feb-08 0:03 
GeneralRe: problem in file deletion Pin
Colin Angus Mackay22-Feb-08 0:17
Colin Angus Mackay22-Feb-08 0:17 
QuestionRe: problem in file deletion Pin
Miss Maheshwari22-Feb-08 0:45
Miss Maheshwari22-Feb-08 0:45 
GeneralRe: problem in file deletion Pin
Giorgi Dalakishvili22-Feb-08 1:06
mentorGiorgi Dalakishvili22-Feb-08 1:06 
QuestionRe: problem in file deletion Pin
Miss Maheshwari22-Feb-08 1:44
Miss Maheshwari22-Feb-08 1:44 
GeneralRe: problem in file deletion Pin
DaveyM6922-Feb-08 1:57
professionalDaveyM6922-Feb-08 1:57 
GeneralRe: problem in file deletion Pin
Xmen Real 22-Feb-08 2:47
professional Xmen Real 22-Feb-08 2:47 
GeneralRe: problem in file deletion Pin
Luc Pattyn22-Feb-08 2:04
sitebuilderLuc Pattyn22-Feb-08 2:04 
GeneralRe: problem in file deletion Pin
Ravenet22-Feb-08 3:11
Ravenet22-Feb-08 3:11 
GeneralProblem with tabindex settings Pin
Dev Motiramani21-Feb-08 23:24
Dev Motiramani21-Feb-08 23:24 
GeneralRe: Problem with tabindex settings Pin
phannon8621-Feb-08 23:27
professionalphannon8621-Feb-08 23:27 
GeneralRe: Problem with tabindex settings Pin
Dev Motiramani22-Feb-08 0:02
Dev Motiramani22-Feb-08 0:02 
GeneralRe: Problem with tabindex settings Pin
phannon8622-Feb-08 0:13
professionalphannon8622-Feb-08 0:13 
GeneralDowncasting VS Interfaces - Performance perceptive Pin
N a v a n e e t h21-Feb-08 23:02
N a v a n e e t h21-Feb-08 23:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.